-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisplay1.php
59 lines (56 loc) · 1.8 KB
/
display1.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
52
53
54
55
56
57
58
59
<?php
include 'conn1.php';
$q = "SELECT * FROM student";
$query = mysqli_query($con, $q);
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="col-lg-12">
<br><br>
<h1 class="text-warning text-center">Display Table Data</h1>
<br>
<table class="table table-striped table-hover table-bordered">
<tr class="bg-dark text-white text-center">
<th>id</th>
<th>Name</th>
<th>Semester</th>
<th>Email</th>
<th>Program</th>
<th>Contact Number</th>
<th>Delete</th>
<th>Update</th>
</tr>
<?php
include 'conn1.php';
$q ="SELECT * FROM student";
$query =mysqli_query($con, $q);
while($r=mysqli_fetch_array($query)){
?>
<tr class="text-center">
<td><?php echo $r["id"];?> </td>
<td><?php echo $r["Name"];?> </td>
<td><?php echo $r["Semester"];?> </td>
<td><?php echo $r["Email"];?> </td>
<td><?php echo $r["Program"];?> </td>
<td><?php echo $r["Contact_Number"];?> </td>
<td><button class="btn-danger btn "> <a href="delete1.php?id=<?php echo $r["id"]; ?>"class="text-white">Delete</a></button></td>
<td><button class="btn-primary btn "> <a href="update1.php?id=<?php echo $r["id"]; ?>" class="text-white">Update</a></button></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</body>
</html>