-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
69 lines (49 loc) · 1.1 KB
/
home.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
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home</title>
<link rel="stylesheet" href="homeStyle.css">
</head>
<body>
</body>
</html>
<?php
$data = file('customers.txt');
echo "<table class='table'>
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
<th> Password </th>
<th> Gender </th>
<th>Country</th>
<th>Address</th>
<th>Skills</th>
<th>Department</th>
<th> Edit </th>
<th> Delete </th>
</tr>
</thead>
"
;
foreach ($data as $key => $value) {
$line = explode(':', $value);
echo "<tr>
<td> $line[0] </td>
<td> $line[1] </td>
<td> $line[2] </td>
<td> $line[3] </td>
<td> $line[4] </td>
<td> $line[5] </td>
<td> $line[6] </td>
<td> $line[7] </td>
<td> $line[8] </td>
<td><a href='edit.php?username=$line[2]' > Edit </a></td>
<td> <a href='delete.php?username=$line[2]'> Delete </a> </td>
</tr>
";
}
echo "</table>";