-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.php
More file actions
62 lines (50 loc) · 1 KB
/
Copy pathview.php
File metadata and controls
62 lines (50 loc) · 1 KB
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
60
61
62
<style>
#bla {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#bla td, #customers th {
border: 1px solid #ddd;
padding: 8px;
}
#bla tr:nth-child(even){background-color: #f2f2f2;}
#bla tr:hover {background-color: #ddd;}
#bla th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
</style>
<?php
require('dbcon.php');
$sql="SELECT * FROM players";
?>
<table id="bla">
<tr>
<th>ID</th>
<th>Name</th>
<th>Age</th>
<th>Edit</th>
</tr>
<?php
$result=$conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
?>
<tr>
<td><?php echo $row['loginid'];?></td>
<td><?php echo $row['Name'];?></td>
<td><?php echo $row['Age'];?></td>
<td><a href="mod.php?loginid=<?php echo $row ['loginid'];?>">Edit</a><td>
</tr>
<?PHP
}
} else {
echo "0 results";
}
$conn->close();
?>