-
Notifications
You must be signed in to change notification settings - Fork 1
/
getuser.php
52 lines (32 loc) · 1.06 KB
/
getuser.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<html>
<body>
<?php
require_once "connect.php";
$sql = $conn->query("SELECT * FROM i_new_user_details
")
or die(mysqli_error($conn)) ;
while($fimpo = $sql->fetch_array()){
$u_name[] = $fimpo['u_name'];
}
// get the q parameter from URL
$q = $_REQUEST["q"];
if ($q !== "") {
$q = strtolower($q);
foreach($u_name as $name) {
if ($name == $q) {
?> <h5 style= "color:red"> <b> "Choose Another Username... !Username already taken!</h5> </b> <?php
} } if ($name != $q) {
?> <h5 "display:none" style= "color:Green"> <b> Username Available </h5> </b><?php ;
} else {
echo "Checking";
}
}
// lookup all hints from array if $q is different from ""
//if ($q !== "") {
// $q = strtolower($q);
// $len=strlen($q);
// Output "no suggestion" if no hint was found or output correct values
//echo $hint === "" ? "no suggestion" : $hint;
?>
</body>
</html>