forked from VishnuPrasad1998/gec-palakkad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow.php
51 lines (33 loc) · 902 Bytes
/
show.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
<HTML>
<body background="./bg.jpg" text=#FFFFFF><div>
<?php
$name=$_POST['name'];
$link = mysqli_connect("localhost", "id5213884_root", "ABCD1234", "id5213884_gecskp");
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// Attempt select query execution
$sql = "SELECT * FROM gecskp WHERE name='$name'" ;
if($result = mysqli_query($link, $sql))
{
echo"<table border=2>";
echo"<tr>";
echo"<td>id</td>";
echo"<td>name</td>";
echo"<td>branch</td>";
echo"<td>semester</td>";
echo "</tr>";
if(mysqli_num_rows($result)>0)
{
while($row=mysqli_fetch_assoc($result)){
echo "<td>".$row['id']."</td>";
echo "<td>".$row['name']."</td>";
echo "<td>".$row['branch']."</td>";
echo "<td>".$row['semester']."</td>";}
}
}
?>
</div>
</body>
</html>