-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
51 lines (46 loc) · 911 Bytes
/
index.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
<?php require('dbconfig.php');?>
<!DOCTYPE html>
<html>
<head>
<title>WORKSHOP || Saadman</title>
<!-- hjcvdbjvdjkv -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<?php
$sql = "SELECT * from info";
$result = $conn-> query($sql);
?>
<div class = "container">
<h2>ALL STUDENT Data</h2><br>
<a class = "btn btn-success" href = "ab.php">ADD</a>
<table class = "table">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Department</th>
<th>Registration</th>
</tr>
</thead>
</tbody>
<?php
if($result->num_rows>0){
while($row= $result-> fetch_assoc()){
echo '<tr class="danger">
<td>'.$row["name"].'</td>
<td>'.$row["email"].'</td>
<td>'.$row["dept"].'</td>
<td>'.$row["reg"].'</td>
</tr>';
}
}else{
echo "0 results";
}
$conn-> close();
?>
</tbody>
</table>
</div>
</body>
</html>