Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('DbManager.php');
- require_once('categories.php');
- dbConnect();
- $categoriesList = getCategories();
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Categories</title>
- </head>
- <body>
- <table border=1px>
- <tr>
- <th>Id</th>
- <th>Category</th>
- <th>Amount of products</th>
- </tr>
- <?php
- foreach ($categoriesList as $item) {
- $id = $item['category_id'];
- $category = $item['name'];
- $count = $item['count'];
- print '<tr>';
- print '<td>' . $id . '</td>';
- print '<td>' . $category . '</td>';
- print '<td><a href="list.php?id=' . $id . '">' . $count . '</a></td>';
- }
- ?>
- </table>
- <br>
- <a href="list.php?id=0">All products</a> | <a href="CategoriesList.php">Categories</a>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement