-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview.php
59 lines (48 loc) · 1.66 KB
/
view.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<style>
table th {
text-align: center;
}
.table {
margin: auto;
width: 30% !important;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<h1 class="text-center text-dark">View recored.</h1>
<hr>
<form action="" method="POST" class="form-horizontal">
<table class="table table-bordered">
<tr>
<th scope="row">Clue_no</th>
<th scope="row">Clue</th>
</tr>
<tbody>
<?php
$conn = mysqli_connect('localhost', 'root', '', 'svit');
$sql = "SELECT clue_no,clue FROM game";
$query = $conn->query($sql);
while ($row = $query->fetch_assoc()) {
?>
<tr>
<td><?php echo $row['clue_no']; ?></td>
<td><?php echo $row['clue']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</form>
</div>
</body>
</html>