Advertisement
Guest User

Untitled

a guest
May 24th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. <?php
  2. require_once("setting.php");
  3. require_once("manage.php");
  4. $con = mysqli_connect($host, $user, $pass);
  5. mysqli_select_db($con, $db);
  6.  
  7. $sql = "SELECT * FROM EOI";
  8. ?>
  9.  
  10. <html>
  11.  
  12. <head>
  13. <link href= "styles/style.css" type="text/css" rel="stylesheet"/>
  14. <link href= "styles/enhancements.css" type="text/css" rel="stylesheet"/>
  15. </head>
  16.  
  17. <?php require_once("header.php");
  18. RenderHeader("Manage Applicants")
  19. ?>
  20.  
  21. </br>
  22. </br>
  23.  
  24. <body>
  25.  
  26. <form name="search" method="post" action="manage.php">
  27. <p><input type="text" name="searchbox" value=""/>
  28. <input type="submit" name="search" value="Search EOI" class="button3"/>
  29. <input type="submit" name="delete" value="Delete Entries" class="button3"/></p>
  30. </form>
  31.  
  32. <?php
  33.  
  34. // $sql2 = "SELECT * FROM EOI";
  35. // $sql2 = "DELETE * FROM EOI";
  36.  
  37. // if (isset($_POST['search'])) {
  38. // $search_term = $_POST["searchbox"];
  39. // $sql2 .= "WHERE JobNumber = '{$search_term}'";
  40. // $sql2 .= "OR FirstName = '{$search_term}'";
  41. // $sql2 .= "OR LastName = '{$search_term}'";
  42. // }
  43.  
  44. // if (isset($_POST['delete'])) {
  45. // $search_term = $_POST["searchbox"];
  46. // $sql3 .= "WHERE JobNumber = '{$search_term}'";
  47. // }
  48.  
  49. $myData = mysqli_query($con,$sql); ?>
  50.  
  51.  
  52. <table border=1>
  53. <tr>
  54. <th>EOI Number</th>
  55. <th>Job Number</th>
  56. <th>First Name</th>
  57. <th>Last Name</th>
  58. <th>Date of Birth</th>
  59. <th>Gender</th>
  60. <th>Address</th>
  61. <th>Suburb</th>
  62. <th>State</th>
  63. <th>Postcode</th>
  64. <th>Email</th>
  65. <th>Phone Number</th>
  66. <th>S1</th>
  67. <th>S2</th>
  68. <th>S3</th>
  69. <th>S4</th>
  70. <th>S5</th>
  71. <th>OtherS</th>
  72. <th>Comments</th>
  73. </tr>
  74.  
  75. <?php
  76.  
  77. $current = "INSERT INTO EOI(Status) VALUE 'Current'";
  78. $final = "INSERT INTO EOI(Status) VALUE 'Final'";
  79.  
  80. while($record = mysqli_fetch_assoc($myData)) {
  81. "<tr>";
  82. echo "<td>".$record['EOINumber']."</td>";
  83. echo "<td>".$record['JobNumber']."</td>";
  84. echo "<td>".$record['GivenName']."</td>";
  85. echo "<td>".$record['LastName']."</td>";
  86. echo "<td>".
  87. "<select id="dropdownbutton" name="State">"
  88. ."<option value='VIC'>".$record['Status'].
  89. "</option>"
  90. "<option value='NSW'>".$current.
  91. "</option>".
  92. "<option value='QLD'>".$final.
  93. "</option>".
  94. "</td>";
  95. echo "<td>".$record['DOB']."</td>";
  96. echo "<td>".$record['Gender']."</td>";
  97. echo "<td>".$record['Address']."</td>";
  98. echo "<td>".$record['Suburb']."</td>";
  99. echo "<td>".$record['State']."</td>";
  100. echo "<td>".$record['Postcode']."</td>";
  101. echo "<td>".$record['Email']."</td>";
  102. echo "<td>".$record['Number']."</td>";
  103. echo "<td>".$record['Self_Sufficient']."</td>";
  104. echo "<td>".$record['Team_Worker']."</td>";
  105. echo "<td>".$record['Hard_Worker']."</td>";
  106. echo "<td>".$record['Passionate']."</td>";
  107. echo "<td>".$record['Fast_Learner']."</td>";
  108. echo "<td>".$record['OtherSkills']."</td>";
  109. echo "<td>".$record['Comments']."</td>";
  110. echo "<td>"."</tr>";
  111. } ?>
  112.  
  113. <?php echo "</table>";
  114.  
  115. mysqli_close($con);
  116. ?>
  117.  
  118.  
  119. </body>
  120. </br>
  121. </br>
  122. </br>
  123. </br>
  124. </br>
  125. </br>
  126. </br>
  127. </br>
  128. </br>
  129. </br>
  130.  
  131.  
  132.  
  133. <?php require_once("footer.php"); ?>
  134.  
  135. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement