Advertisement
GregLeblanc

Untitled

Nov 5th, 2024 (edited)
52
0
355 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.75 KB | None | 0 0
  1. <?php
  2. // Include the database connection file
  3. include_once("config.php");
  4. // include("common_functions.php");
  5.  
  6. // Fetch active operators
  7. $active_operators = mysqli_query($mysqli, "SELECT * FROM operators WHERE status='Active' ORDER BY name");
  8.  
  9. function build_oper_pulldown () {
  10.     echo "<select name='selname'>";
  11.     while ($operator = $active_operators->fetch_array(MYSQLI_ASSOC)) {
  12.         echo '<option value="' .$operator['seq_nmbr'] . '">' . $operator['fname'] . "\n";
  13.     }
  14.     echo "</select>\n";
  15. }
  16. ?>
  17. <html>
  18. <head> 
  19.     <title>OUAL Operator Training Information</title>
  20.     <link rel="stylesheet" href="styles.css" />
  21. </head>
  22. <body>
  23.     <h1>EAL Personnel Information</h1>
  24.     <h2>Operator Training Information</h2>
  25.     <br/>
  26.     <p>I want to:
  27.         <ol>
  28.             <form method=post name="add_operator" action="add_user.php">
  29.                 <li>Add completed training certification for operator
  30.                     <?php
  31.                         echo "<select name='selname'>";
  32.                         while ($operator = $active_operators->fetch_array(MYSQLI_ASSOC)) {
  33.                             echo '<option value="' .$operator['seq_nmbr'] . '">' . $operator['fname'] . "\n";
  34.                         }
  35.                         echo "</select>\n";
  36.                     ?>
  37.                     <button type=submot name="add_operator" value="add_operator">
  38.                         (Select name and press here)
  39.                     </button>
  40.                 </li>
  41.             </form>
  42.             <form method=post name="delete" action="delete_certification.php">
  43.                 <li>Delete
  44.                     <?php
  45.                     build_oper_pulldown();
  46.                     ?>
  47.             </form>
  48.         </ol>
  49.     </p>
  50. </body>
  51. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement