users can now list their products
This commit is contained in:
parent
a2dd6ddf83
commit
fe1d13d28b
28
list-products.php
Normal file
28
list-products.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
require_once("./assets/php/utils.php");
|
||||
|
||||
if (!is_connected()) {
|
||||
header("location: login.php");
|
||||
}
|
||||
|
||||
$product_list = "";
|
||||
foreach (get_users_products_array() as $row) {
|
||||
$product_list = $product_list . "<p>"
|
||||
. htmlspecialchars($row["name"]) . "</p>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>List products</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php echo $product_list; ?>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user