Public paste
nett-
By: Better - | Date: Sep 24 2008 18:03 | Format: PHP | Expires: never | Size: 3.09 KB | Hits: 1196

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