-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodifySelect.php
More file actions
51 lines (43 loc) · 1.06 KB
/
modifySelect.php
File metadata and controls
51 lines (43 loc) · 1.06 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
<?php
include "connectDB.php";
$sql = "SELECT * FROM user;";
$result = mysqli_query($DB_Link, $sql);
if(mysqli_num_rows($result)){
?>
<html>
<head>
<title>Contact List</title>
</head>
<body>
<table border="1" width="860px" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="yellow" align="center">
<td width="80px">Name</font></td>
<td width="30px">Sex</td>
<td width="150px">Telephone</td>
<td width="150px">Email</td>
<td width="400px">Notes</td>
<td width="50px"></td>
</tr>
<?php
while ($input = mysqli_fetch_row($result)) {
?>
<tr>
<td align="center"><?=$input[0];?></td>
<td align="center"><?=$input[1];?></td>
<td align="center"><?=$input[2];?></td>
<td align="center"><?=$input[3];?></td>
<td><?=$input[4];?></td>
<td><a href="./modifyPage.php?name=<?=$input[0];?>&sex=<?=$input[1];?>&telephone=<?=$input[2];?>&email=<?=$input[3];?>¬es=<?=$input[4];?>">modify</a></td>
</tr>
<?php
}
}
else{
print('There is no data to modify!');
}
mysqli_free_result($result);
mysqli_close($DB_Link);
?>
</table>
</body>
</html>