Public paste
fix
By: Niels- | Date: Mar 11 2007 16:50 | Format: PHP | Expires: never | Size: 1.19 KB | Hits: 782

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Untitled Document</title>
  6. </head>
  7.  
  8. <body>
  9. <form method="post"><br />
  10. <input type="text" name="name" value="" /><br />
  11. <input type="password" name="password1" value="" /><br />
  12. <input type="password" name="password2" value="" /><br />
  13. <input type="submit" name="sumbit" value="Sign Up" /><br />
  14. </form>
  15. <?php
  16. if (isset($_POST['sumbit'])) {
  17.  
  18. if ($_POST['name'] == "") {
  19. $error = 'niet alle velden zijn ingevuld'; }
  20. if ($_POST['password1'] == "") {
  21. $error .= 'niet alle velden zijn ingevuld'; }
  22. if ($_POST['password1'] != $_POST['password2']) {
  23. $error .= 'de passworden komen niet overheen'; }
  24. if (!isset($error)) {
  25.  
  26. echo "Beste ".$_POST['name'].", u heeft alles correct ingevuld<br />";
  27.  
  28. } else {  echo "Gelieve alle formuliervelden netjes in te vullen !<BR /><BR />";
  29.         echo "<FONT COLOR="#FF0000">".$error."</FONT>";
  30.        
  31.     }
  32.    
  33. } else {
  34.  
  35.     echo "U moet eerst het formulier invullen !";
  36. }
  37. ?>
  38. </body>
  39. </html>