-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisplay.php
43 lines (40 loc) · 1.17 KB
/
display.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
<?php
$host = "localhost";
$user = "sanjay_ch";
$pass = "3vXt73bGW7mEcGnI";
$conn = mysqli_connect($host,$user,$pass);
if (!$conn)
{
die('Could not connect: ' . mysql_error());
}
$db = mysqli_select_db($conn,'project1');
$list = mysqli_query($conn,"SELECT * FROM details");
session_start();
$_SESSION["clear"] = "";
session_unset();
session_destroy();
?>
<!DOCTYPE html>
<html>
<body>
<table>
<tr>
<th STYLE="Padding: 10px;"><?= "college" ?></th>
<th STYLE="Padding: 0px;"><?= "laoction" ?></th>
<th STYLE="padding :10px;"><?= "facilities" ?></th>
<th STYLE="Padding: 10px;"><?= "reviews" ?></th>
</tr>
<?php foreach($list as $detail): ?>
<tr>
<td><?= $detail["college"] ?></td>
<td><?= $detail["location"] ?></td>
<td><?= $detail["facilities"] ?></td>
<td><?= $detail["reviews"] ?></td>
</tr>
<?php endforeach ?>
</table>
</body>
</html>
<?php
mysqli_close($conn);
?>