forked from pagevamp/php-intern-task
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist.php
35 lines (31 loc) · 964 Bytes
/
list.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
<?php
include 'vendor/autoload.php';
$users = (new Classes\User())->getAll();
?>
<html>
<head>
<title>User Crud</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="row">
<h1>User List</h1>
<table class="table">
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
</tr>
<?php foreach ($users as $user): ?>
<tr>
<td><?php echo $user->getFirstName(); ?></td>
<td><?php echo $user->getLastName(); ?></td>
<td><?php echo $user->getEmail(); ?></td>
</tr>
<?php endforeach; ?>
</table>
</div>
</div>
</body>
</html>