Public paste
Some BS
By: Xmoo | Date: Oct 6 2008 13:37 | Format: PHP | Expires: never | Size: 1.67 KB | Hits: 1120

  1. <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') {
  2.                 $insert = "INSERT INTO bloem_actie (product, v_naam, v_adres, v_postcode, v_plaats, v_email)
  3.                                    values ('". $_POST["product"] ."', '". $_POST["v_naam"] ."', '". $_POST["v_adres"] ."', '". $_POST["v_postcode"] ."', '". $_POST["v_plaats"] ."', '". $_POST["v_email"] ."')";
  4.                 $query = mysql_query($insert)or die(mysql_error());
  5.                 echo "<h3>Uw deelname is genoteerd.</h3>";
  6.         }
  7.         else {
  8.                
  9.                 echo "<form action="actie.php" method="post">";
  10.                 $obj=mysql_query("SELECT count(1) as total FROM bloem_product") or die(mysql_error());
  11.                 while ($info = mysql_fetch_object($obj))      
  12.                         { $aid = $info->total; }
  13.                 echo "<label for="Product" id="Product">Product*</label>
  14.                                 <select name="product">
  15.                                 <option value="$aid">$aid</option>
  16.                                 </select>";
  17.                 echo "<br /><br />";
  18.                 echo "<label for="Voornaam" id="Voornaam">V/A Naam*</label>";
  19.                 echo "<input type="text" name="v_naam" size="49"/>";
  20.                 echo "<br />";
  21.                 echo "<label for="Adres" id="Adres">Adres + nr.*</label>";
  22.                 echo "<input type="text" name="v_adres" size="49"/>";
  23.                 echo "<br />";
  24.                 echo "<label for="Postcode" id="Postcode">Postcode*</label>";
  25.                 echo "<input type="text" name="v_postcode" size="49"/>";
  26.                 echo "<br />";
  27.                 echo "<label for="Plaats" id="Plaats">Woonplaats*</label>";
  28.                 echo "<input type="text" name="v_plaats" size="49"/>";
  29.                 echo "<br />";
  30.                 echo "<label for="Email" id="Email">Email*</label>";
  31.                 echo "<input type="text" name="v_email" size="49"/><br>";
  32.                 echo "<center><input type="submit" name="submit" value="" class="submit-button" /></center>";    
  33.                 echo "</form>";
  34.         }
  35.                 ?>