-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathadmin.php
More file actions
28 lines (28 loc) · 749 Bytes
/
admin.php
File metadata and controls
28 lines (28 loc) · 749 Bytes
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
<html>
<head>
<title>Web Development Workshop</title>
<link href="simple-style.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<div id='header'>
<h1>Admin Panel</h1>
</div>
<div id='wrapper' style='margin-left:20px;'>
<?php
require_once('connect.php');
echo "<table>";
echo "<tr><th>id</th><th>name</th><th>event</th><th>phone</th></tr>";
$query="SELECT * FROM `reg`";
$result=$mysqli->query($query);
while($row=$result->fetch_assoc())
{
$q="SELECT * FROM `events` WHERE id='$row[event_id]'";
$r=$mysqli->query($query);
$rw=$r->fetch_assoc();
echo "<tr><td>".$row['id']."</td><td>".$row['name']."</td><td>".$rw['name']."</td><td>".$row['phone']."</td></tr>";
}
echo "</table>";
?>
</div>
</body>
</html>