Advertisement
adrianpascua

Untitled

Jun 10th, 2016
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. //PHP CONNECTION AND QUERY
  2. <?php
  3.  
  4. include '../session.php';
  5. require_once 'config.php';
  6. include 'header.php';
  7.  
  8. $query = "SELECT * FROM `crew_info` WHERE `id` = ?";
  9. $stmt = mysqli_prepare($conn, $query);
  10. mysqli_stmt_bind_param($stmt, 's', $_GET['id']);
  11. mysqli_stmt_execute($stmt);
  12. mysqli_stmt_bind_result($stmt, $id, $first_name, $middle_name, $last_name, $age, $month, $day, $year, $birth_place, $gender, $martial_status, $religion, $nationality, $email_address, $address_1, $address_2, $course, $school_graduated, $remarks, $date_added, $crew_status, $image_name, $passport);
  13.  
  14. ?>
  15.  
  16. <table class="table table-condensed">
  17. <thead class="thead-inverse">
  18. <tr>
  19. <th>First Name</th>
  20. <th>Middle Name</th>
  21. <th>Last Name</th>
  22. <th>Age</th>
  23. <th>Birth Date</th>
  24. <th>Birth Place</th>
  25. <th>Gender</th>
  26. <th>Marital Status</th>
  27. <th>Religion</th>
  28. </thead>
  29. </tr>
  30. <tr>
  31.  
  32. <?php
  33. while(mysqli_stmt_fetch($stmt)) {
  34. echo '<tr>';
  35. echo "<td class=\"col-md-2\">".sprintf("%s", $first_name)."</td>";
  36. echo "<td class=\"col-md-2\">".sprintf("%s", $middle_name)."</td>";
  37. echo "<td class=\"col-md-2\">".sprintf("%s", $last_name)."</td>";
  38. echo "<td class=\"col-md-2\">".sprintf("%s", $age)."</td>";
  39. echo "<td class=\"col-md-2\">".sprintf("%s %s %s", $month, $day, $year)."</td>";
  40. echo "<td class=\"col-md-2\">".sprintf("%s", $birth_place)."</td>";
  41. echo "<td class=\"col-md-2\">".sprintf("%s", $gender)."</td>";
  42. echo "<td class=\"col-md-2\">".sprintf("%s", $martial_status)."</td>";
  43. echo "<td class=\"col-md-2\">".sprintf("%s", $religion)."</td>";
  44. echo '</tr>';
  45. }
  46. ?>
  47. </tr>
  48.  
  49. <thead class="thead-inverse">
  50. <tr>
  51. <th>Nationality</th>
  52. <th>Email Address</th>
  53. <th>Address 1</th>
  54. <th>Address 2</th>
  55. <th>Course</th>
  56. <th>School Graduated</th>
  57. <th>Remarks</th>
  58. <th>Date Added</th>
  59. <th>Status</th>
  60. </thead>
  61. </tr>
  62. <?php
  63. while(mysqli_stmt_fetch($stmt)) {
  64. echo '<tr>';
  65. echo "<td class=\"col-md-2\">".sprintf("%s", $nationality)."</td>";
  66. echo "<td class=\"col-md-2\">".sprintf("%s", $email_address)."</td>";
  67. echo "<td class=\"col-md-2\">".sprintf("%s", $address_1)."</td>";
  68. echo "<td class=\"col-md-2\">".sprintf("%s", $address_2)."</td>";
  69. echo "<td class=\"col-md-2\">".sprintf("%s", $course)."</td>";
  70. echo "<td class=\"col-md-2\">".sprintf("%s", $school_graduated)."</td>";
  71. echo "<td class=\"col-md-2\">".sprintf("%s", $remarks)."</td>";
  72. echo "<td class=\"col-md-2\">".sprintf("%s", $date_added)."</td>";
  73. echo "<td class=\"col-md-2\">".sprintf("%s", $crew_status)."</td>";
  74. echo '</tr>';
  75. }
  76. ?>
  77.  
  78. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement