Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.50 KB | None | 0 0
  1. <?php
  2.     session_start();
  3.     //this file should be inside mamp htdocs
  4.     require '../dbinfo.php';
  5. ?>
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9.     <!--Title name of page-->
  10.     <title>Dee Truffles</title>
  11.     <meta />
  12.     <link rel="stylesheet" href="css/style.css" />
  13. </head>
  14. <body>
  15. <div id="top-nav">
  16.     <div class="logo">
  17.         <!--Logo Image-->
  18.         <img src="images/kinder/kinder1.png" />
  19.     </div>
  20.     <div class="search-box-&-main-menu-container">
  21.         <!--Main menu-->
  22.         <!--Wrapper for main menu-->
  23.         <ul class="main-menu" >
  24.             <li><a href="admin_user.php">Admin/User</a> </li>
  25.             <li><a href="order.php">Orders</a> </li>
  26.             <li><a href="faq.php">FAQ</a></li>
  27.             <li><a href="product.php">Products</a> </li>
  28.             <li><a href="customer.php">Customer</a></li>
  29.             <li><a href="category.php">Category</a> </li>
  30.         </ul>
  31.     </div>
  32.     <?php
  33.     $sql= "select staff_id, email from staff_table";
  34.     //execute the sql statement
  35.                 $statement = $db->query($sql);
  36.                 foreach ($statement as $results) {
  37.                     //Display the product image, product name on index.php
  38.                     echo'<tr>
  39.                         <!--Requesting all the staff emails from the database-->
  40.                         <td><b>Email:</b> '. $results['email'].'</td>
  41.                         <!--Edit the staff emails-->
  42.                        <td><a href="admin_user_edit.php?id='.$results['staff_id'].'">Edit</a></td>
  43.                        <!--Delete the staff emails-->
  44.                         <td><a href="admin_user_delete.php?id='.$results['staff_id'].'">Delete</a></td>
  45.                         </tr>';
  46.                 }
  47.     ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement