-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkregister.php
40 lines (37 loc) · 1.24 KB
/
checkregister.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
<form action="checkregister.php" method="post">
VM ID:<br>
<input type="text" name="id" value=""><br>
<input type="hidden" name="action" value="check">
<input type="submit" value="Submit">
</form>
<?php
$servername = "mysql.hostinger.in";
$username = "u109122165_vm";
$password = "KumarPrasun2017";
$dbname = "u109122165_reg";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if(isset($_POST["action"])){
if($_POST['action']='check'){
$idtocheck= mysqli_real_escape_string($conn, trim($_POST["id"]));
$sql1 = "SELECT * FROM `vm_register` WHERE `vmid`='$idtocheck';";
if ($result = $conn->query($sql1)) {
echo "<table><tr><th>Name</th><th>Email</th><th>Phone</th><th>College</th><th>Book My Show ID</th></tr>";
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$name = $row['name'];
$email = $row['email'];
$phone = $row['phone'];
$college = $row['college'];
$bookmyshow = $row['bookmyshow'];
echo "<tr><td>".$name."</td><td>".$email."</td><td>".$phone."</td><td>".$college."</td><td>".$bookmyshow."</td></tr>";
}
echo "</table>";
}
else{
echo 'Shit';
}
}
}
?>