Files
php-vulnerabilities/users.php

35 lines
816 B
PHP

<?php
include_once 'database.php';
if (!isset($users)) {
$users = getAllUsers();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Users - WIP</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<?php include 'header.php'; ?>
<h1>Users - Work in progress!</h1>
<h2>Users:</h2>
<?php if (empty($users)): ?>
<p>No users found.</p>
<?php else: ?>
<?php foreach ($users as $user): ?>
<div class="product">
<h3><?= $user[1] ?></h3>
<p>Id: <?= $user[0] ?></p>
<p>Email: <strong><?php echo $user[2]; ?></strong></p>
</div>
<?php endforeach; ?>
<?php endif; ?>
</body>
</html>