Public paste
Checkbox
By: Xmoo | Date: Sep 24 2008 17:28 | Format: PHP | Expires: never | Size: 2.79 KB | Hits: 1200

  1. <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') {
  2.                 $insert = "INSERT INTO bloem_db (a_voornaam, a_achternaam, a_adres, a_postcode, a_email, v_voornaam, v_achternaam, v_adres, v_postcode, v_email, bericht)
  3.                                    values ('". $_POST["a_voornaam"] ."', '". $_POST["a_achternaam"] ."', '". $_POST["a_adres"] ."', '". $_POST["a_postcode"] ."', '". $_POST["a_email"] ."', '". $_POST["v_voornaam"] ."', '". $_POST["v_achternaam"] ."', '". $_POST["v_adres"] ."', '". $_POST["v_postcode"] ."', '". $_POST["v_email"] ."', '". $_POST["bericht"] ."')";
  4.                 $query = mysql_query($insert)or die(mysql_error());
  5. if(isset($_POST['form'])) {
  6.   if(isset($_POST['checkbox'])) {  
  7.     echo "<h3>U aanvraag is verstuurd.</h3>";  
  8.   } else {             
  9.                 echo "<form action="index.php" method="post" name="form">";
  10.                 echo "<label for="Naam" id="Naam">Voornaam*</label>";
  11.                 echo "<input type="text" name="a_voornaam" size="49"/>";
  12.                 echo "<br />";
  13.                 echo "<label for="Achternaam" id="Achternaam">Achternaam*</label>";
  14.                 echo "<input name="a_achternaam" type="text" size="49" />";
  15.                 echo "<br />";
  16.                 echo "<label for="Adres" id="Adres">Adres*</label>";
  17.                 echo "<input type="text" name="a_adres" size="49"/>";
  18.                 echo "<br />";
  19.                 echo "<label for="Postcode" id="Postcode">Postcode*</label>";
  20.                 echo "<input type="text" name="a_postcode" size="49"/>";
  21.                 echo "<br />";
  22.                 echo "<label for="Email" id="Email">Email*</label>";
  23.                 echo "<input type="text" name="a_email"size="49" />";
  24.                 echo "<br />";
  25.                 echo "<br />";
  26.                 echo "<br />";
  27.                 echo "<br style="margin-bottom:1em;" />";
  28.                
  29.                 echo "<label for="Voornaam2" id="Voornaam2">Voornaam*</label>";
  30.                 echo "<input type="text" name="v_voornaam" size="49"/>";
  31.                 echo "<br />";
  32.                 echo "<label for="Achternaam2" id="Achternaam2">Achternaam*</label>";
  33.                 echo "<input type="text" name="v_achternaam" size="49"/>";
  34.                 echo "<br />";
  35.                 echo "<label for="Adres2" id="Adres2">Adres*</label>";
  36.                 echo "<input type="text" name="v_adres" size="49"/>";
  37.                 echo "<br />";
  38.                 echo "<label for="Postcode2" id="Postcode2">Postcode*</label>";
  39.                 echo "<input type="text" name="v_postcode" size="49"/>";
  40.                 echo "<br />";
  41.                 echo "<label for="Email2" id="Email2">Email*</label>";
  42.                 echo "<input type="text" name="v_email" size="49"/>";
  43.                 echo "<br />";
  44.                 echo "<label for="Berichtje" id="Berichtje" >Berichtje*</label>";
  45.                 echo "<input type="text" size="49" name="bericht"  value=""/>";
  46.                 echo "<br />";
  47.                 echo "<label><INPUT TYPE="checkbox" NAME="checkbox" VALUE="1"></label> <b>Ik ga akkoord met de algemene voorwaarden.</b>";
  48.                 echo "<p>";
  49.                 echo "<input type="submit" name="submit" value="" class="submit-button" />";    
  50.                 echo "</p>";
  51.                 echo "</form>";
  52.         }
  53.         }
  54. }
  55.                 ?>