-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtutoring_info.php
77 lines (68 loc) · 1.92 KB
/
tutoring_info.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
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Himanshu">
<meta name="author" content="Kyle">
<title>Tutor Info</title>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
th {
color: white;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
h2, a {
font-family: arial, sans-serif;
}
th {
background-color: #656464;
}
body {
background-color: #6600cc;
}
.container {
border-radius: 5px;
padding: 20px;
background-color: #ffffff;
}
</style>
</head>
<body>
<div class ="container">
<table id="tutor_table">
<tr>
<th>Email</th>
<th>Name</th>
<th>Day</th>
<th>Start Time</th>
<th>End Time</th>
</tr>
<?php
//get info from text file and display in table
$myfile = fopen("tutor_info.txt", "r+");
$newline = fgets($myfile);
while ($newline !== false)
{
$regex = "/#,,#";
echo "<tr><td>".preg_replace($regex . "/", "</td><td>", $newline)."</td></tr>";
$newline = fgets($myfile);
}
fclose($myfile);
?>
</table>
<br>
<a href="index.html">Go back to homepage</a>
</div>
</body>
</html>