Advertisement
adrianpascua

Untitled

May 24th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4. require_once 'config.php';
  5.  
  6. if (@$_SESSION['username']) {
  7.  
  8. $search = 'PENDING';
  9. $query = "SELECT * FROM `crew_info` WHERE `crew_status` = ?";
  10. $stmt = mysqli_prepare($conn, $query);
  11. mysqli_stmt_bind_param($stmt, 's', $search);
  12. mysqli_stmt_execute($stmt);
  13. mysqli_stmt_bind_result($stmt, $col1, $col2, $col3, $col4, $col5, $col6, $col7, $col8, $col9, $col10, $col11, $col12, $col213, $col14, $col15, $col16, $col17, $col18, $col19);
  14.  
  15. echo '<!DOCTYPE html>
  16. <html>
  17. <head>
  18. <title>All Crew</title>
  19. </head>
  20. <body>
  21. <form method="POST">
  22. <table border="2" align="center" width="600" cellspacing="3" cellpadding="4">
  23. <tr>
  24. <th>First Name</th>
  25. <th>Middle Name</th>
  26. <th>Last Name</th>
  27. <th>Date Added</th>
  28. <th>Status</th>
  29. <th>REVIEW</th>
  30. </tr>
  31. <tr>';
  32. $rows = array();
  33. while($record = mysqli_stmt_fetch($stmt)) {
  34. echo "<tr>";
  35. echo "<th>".sprintf("%s", $col2)."</th>";
  36. echo "<th>".sprintf("%s", $col3)."</th>";
  37. echo "<th>".sprintf("%s", $col4)."</th>";
  38. echo "<th>".sprintf("%s", $col18)."</th>";
  39. echo "<th>".sprintf("%s", $col19)."</th>";
  40. echo "<th><a target='_blank' href='review.php?id=$col1'>Click</a></th>";
  41. echo '</tr>';
  42. }
  43. echo '</table>
  44. </form>
  45. </body>
  46. </html>';
  47.  
  48.  
  49. }
  50. else {
  51. header('Location: /practice1/index.php');
  52. }
  53.  
  54. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement