Advertisement
Guest User

Untitled

a guest
Mar 29th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1. <?php
  2.  
  3. // Initialize the session
  4. if (session_status() == PHP_SESSION_NONE) {
  5.     session_start();
  6. }
  7.  
  8. require_once "config.php";
  9.  
  10. $unique_code = $_SESSION["unique_code"];
  11.  
  12. $stmt = $pdo->prepare("SELECT * FROM wishlist_items WHERE unique_code = :unique_code");
  13. $stmt->bindParam(":unique_code", $unique_code, PDO::PARAM_INT);
  14. $stmt->execute();
  15. $number_of_rows = $stmt->rowCount();
  16.  
  17. ?>
  18. <center><button id="add" class="btn btn-primary" style="width: 960px">Add</button></center>
  19. <table id="user_data" align="center" class="table table-hover table-striped" style="width: 960px">
  20.     <tr>
  21.         <th>Prio</th>
  22.         <th>Description</th>
  23.         <th>Done</th>
  24.     </tr>
  25.     <?php
  26.  
  27.     while ($row = ($result = $stmt->fetch(PDO::FETCH_ASSOC))) {
  28.     ?>
  29.         <tr>
  30.             <td><?php echo $row['page_order']; ?></td>
  31.             <td><?php echo $row['description']; ?></td>
  32.             <td><?php echo ($row['done'] ? "true" : "false"); ?></td>
  33.         </tr>
  34.     <?php
  35.     }
  36.     ?>
  37. </table>
  38. <?php
  39.  
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement