Public paste
Undefined
By: Script | Date: Nov 3 2008 16:52 | Format: PHP | Expires: never | Size: 910 B | Hits: 1267

  1. Zoeken:
  2.  
  3. <h3>Vul hier naam in:</h3>
  4. <form action="medewerkers.php" method="post">
  5. Voornaam        &nbsp&nbsp  <input type="text" name="voornaam value="" size"30"><br>
  6. Achternaam      &nbsp<input type="text" name="achternaam value="" size"30">
  7. <input type="Submit" value="Zoeken">
  8. </form>
  9.  
  10. Medewerkers:
  11.  
  12. <?php
  13. $con = mysql_connect("localhost","root","php");
  14. if (!$con)
  15.   {
  16.   die('Could not connect: ' . mysql_error());
  17.   }
  18.  
  19. mysql_select_db("medewerkers", $con);
  20.  
  21. $result = mysql_query("SELECT * FROM status");
  22.  
  23. echo
  24. "<h4>Medewerkers:</h4>
  25. <table border='1'>
  26. <tr>
  27. <th>voornaam</th>
  28. <th>achternaam</th>
  29. <th>status</th>
  30. </tr>";
  31.  
  32. while($row = mysql_fetch_array($result))
  33.   {
  34.   echo "<tr>";
  35.   echo "<td>" . $row['Voornaam'] . "</td>";
  36.   echo "<td>" . $row['Achternaam'] . "</td>";
  37.   echo "<td>" . $row['Status'] . "</td>";
  38.   echo "</tr>";
  39.   }
  40.  
  41. echo "</table>";
  42.  
  43. ?>