-
Notifications
You must be signed in to change notification settings - Fork 5
/
gethint.php
34 lines (28 loc) · 1.15 KB
/
gethint.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
<?php
$q = $_GET['q'];
include('db_connect.php');
$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $db);
if(! $conn ) {
die('Could not connect: ' . mysqli_error());
}
$sql = "SELECT * FROM users where name='$q';";//incommplete
mysqli_select_db( $conn,'test_db');
$retval = mysqli_query( $conn , $sql);
if(! $retval ) {
die('Could not enter data: ' . mysqli_error($conn));
}
while($row = mysqli_fetch_array($retval, MYSQL_ASSOC))
{
$NAME = $row['name'];
$VOTERID = $row['voterid'];
$DOB = $row['dob'];
$GENDER = $row['gender'];
$MOBILE = $row['mobile'];
$IMAGE = $row['image'];
echo "Name : $NAME <br>";
echo "Voter Id : $VOTERID <br>";
echo "Date of Birth : $DOB <br>";
echo "Gender : $GENDER <br>";
echo "Mobile Number : $MOBILE";
}
?>