File: D:/HostingSpaces/SBogers10/komma-mediadesign.nl/wwwroot/ledub/nl/inschrijven.php
<?php
if (isset($_POST['verzenden']))
{
$verzenden = "true";
}
if (isset($_POST['postcode']))
{
$postcode = $_POST['postcode'];
};
if (isset($_POST['contactpersoon']))
{
$contactpersoon=$_POST['contactpersoon'];
};
if (isset($_POST['gsm']))
{
$gsm=$_POST['gsm'];
$gsm2 = str_replace("-","",$gsm);
$gsm3 = str_replace(" ","",$gsm2);
if(ereg("^[0-9]{10}$",$gsm3)){
$valid_gsm = "true";
}
};
if (isset($_POST['teamnaam']))
{
$teamnaam=$_POST['teamnaam'];
$lengte = strlen($teamnaam);
if($lengte < 19){
$team_correct = "true";
}
};
if (isset($_POST['adres']))
{
$adres=$_POST['adres'];
};
if (isset($_POST['huisnummer']))
{
$huisnummer=$_POST['huisnummer'];
};
if (isset($_POST['vereniging']))
{
$vereniging=$_POST['vereniging'];
};
if (isset($_POST['woonplaats']))
{
$woonplaats=$_POST['woonplaats'];
};
if (isset($_POST['telefoon']))
{
$telefoon=$_POST['telefoon'];
$telefoon2 = str_replace("-","",$telefoon);
$telefoon3 = str_replace(" ","",$telefoon2);
};
if (isset($_POST['emailadres']))
{
$emailadres=$_POST['emailadres'];
$emailadres=strtolower($emailadres);
if(ereg("^[a-z0-9_.-]*@[a-z0-9_.-]*[.][a-z]*([.][a-z]*)?$",$emailadres)){
$valid_mail = "true";
}
};
if (isset($_POST['kamperen']))
{
$kamperen=$_POST['kamperen'];
};
if (isset($_POST['klasse']))
{
$klasse=$_POST['klasse'];
};
if (isset($_POST['opmerkingen']))
{
$opmerkingen=$_POST['opmerkingen'];
};
//-----------------------------------------------
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Inschrijving Ledûbtoernooi 2009</title>
<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif;
color: #000000;
}
-->
</style>
</head>
<body class="style1">
<p class="style1">Inschrijving Ledûbtoernooi 2009</p>
<table width="822" border="0">
<form method="post" action="
<?php if (!empty($vereniging) && $team_correct == "true" && !empty($teamnaam) && !empty($contactpersoon) && $valid_gsm == "true" && !empty($adres) && !empty($postcode) && !empty($woonplaats) && !empty($telefoon3) && !empty($kamperen) && $valid_mail == "true" && !empty ($klasse)){
print("bevestiging.php");
}else{
echo $_SERVER['PHP_SELF']; }?>">
<tr>
<th width="262" scope="col">Vul hier al uw gegevens correct in</th>
<th width="308" scope="col"> </th>
<th width="193" scope="col"> </th>
</tr>
<tr>
<td scope="col"><span class="tekst">Vereniging:</span></td>
<td><input name="vereniging" type="text" id="vereniging" value = "<?php print($vereniging) ?>" size="40"/></td>
<td><?php if ($verzenden == "true" && empty($vereniging)){
print ("Vul uw vereniging correct in");
}?></td>
</tr>
<tr>
<td>Teamnaam (max 18 karakters):</td>
<td><input name="teamnaam" type="text" id="teamnaam" value = "<?php print($teamnaam) ?>" size="40" maxlength="18"/></td>
<td><?php if ($verzenden == "true" && ($team_correct != "true" || empty($teamnaam))){
print ("Vul uw teamnaam correct in");
}?>
</td>
</tr>
<tr>
<td>Contactpersoon</td>
<td><input name="contactpersoon" type="text" id="contactpersoon" value = "<?php print($contactpersoon) ?>" size="40"/></td>
<td><?php if ($verzenden == "true" && empty($contactpersoon)){
print ("Vul uw contactpersoon correct in");
}?></td>
</tr>
<tr>
<td>GSM contactpersoon
<br />
tijdens toernooi:</td>
<td><input name="gsm" type="text" id="gsm" value = "<?php print($gsm3) ?>" size="40"/></td>
<td><?php if ($verzenden == "true" && $valid_gsm != "true"){
print ("Vul uw gsm correct in");
}?></td>
</tr>
<tr>
<td>Adres</td>
<td><input name="adres" type="text" id="adres" value = "<?php print($adres) ?>" size="40"/></td>
<td><?php if ($verzenden == "true" && empty($adres)){
print ("Vul uw adres correct in");
}?></td>
</tr>
<tr>
<td>Postcode</td>
<td><input name="postcode" type="text" id="postcode" value = "<?php print($postcode) ?>" size="40"/></td>
<td><?php if ($verzenden == "true" && empty($postcode)){
print ("Vul uw postcode correct in");
}?></td>
</tr>
<tr>
<td>Woonplaats</td>
<td><input name="woonplaats" type="text" id="woonplaats" value = "<?php print($woonplaats) ?>" size="40"/></td>
<td><?php if ($verzenden == "true" && empty($woonplaats)){
print ("Vul uw woonplaats correct in");
}?></td>
</tr>
<tr>
<td>Telefoon</td>
<td><input name="telefoon" type="text" id="telefoon" value = "<?php print($telefoon3) ?>" size="40"/></td>
<td><?php if ($verzenden == "true" && empty($telefoon3)){
print ("Vul uw telefoonnummer correct in");
}?></td>
</tr>
<tr>
<td>E-mailadres</td>
<td><input name="emailadres" type="text" id="emailadres" value = "<?php print($emailadres) ?>" size="40"/></td>
<td><?php if ($verzenden == "true" && $valid_mail != "true"){
print ("Vul uw e-mailadres correct in");
}?></td>
</tr>
<tr>
<td>Kamperen <strong>à €20,.<br />
</strong>(alleen voor teams buiten de Gemeente Cranendonck) <strong><br />
</strong></td>
<td>Ja
<input type="radio" name="kamperen" id="ja" value="ja" <?php if ($kamperen == "ja") {print("checked= \"checked\"");} else{ print("");} ?>/>
Nee
<input type="radio" name="kamperen" id="nee" value="nee" <?php if ($kamperen == "nee") {print("checked= \"checked\"");} else {print("");}?> /></td>
<td><?php if ($verzenden == "true" && empty($kamperen)){
print ("Vul uw kampeer keuze in");
}?></td>
</tr>
<tr>
<th> </th>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Eeventuele opmerkingen:</td>
<td><textarea name="opmerkingen" cols="35" rows="5" id="opmerkingen"><?php print($opmerkingen) ?></textarea></td>
<td></td>
</tr>
<tr>
<td>Selecteer het gewenste niveau:</td>
<td> </td>
<td><br /> <br /></td>
<tr><td width='262' class='tekst'>HEREN 1<sup>e</sup> DIVISIE</td><td><input type="radio" name="klasse" id="Heren 1ste Divisie" value="Heren 1ste Divisie" <?php if ($klasse == "Heren 1ste Divisie") {print("checked= \"checked\"");} else{ print("");} ?>/></td><td><span class="tekst">DAMES 1<sup>e</sup> DIVISIE</span></td><td
width='41' class='tekst'><input type="radio" name="klasse" id="Dames 1ste Divisie" value="Dames 1ste Divisie" <?php if ($klasse == "Dames 1ste Divisie") {print("checked= \"checked\"");} else{ print("");} ?>/></td></tr>
<tr><td width='262' class='tekst'>HEREN 2<sup>e</sup> DIVISIE</td><td><input type="radio" name="klasse" id="Heren 2de Divisie" value="Heren 2de Divisie" <?php if ($klasse == "Heren 2de Divisie") {print("checked= \"checked\"");} else{ print("");} ?>/></td><td width='193'><span class="tekst">DAMES 2<sup>e</sup> DIVISIE</span></td><td
width='41' class='tekst'><input type="radio" name="klasse" id="Dames 2de Divisie" value="Dames 2de Divisie" <?php if ($klasse == "Dames 2de Divisie") {print("checked= \"checked\"");} else{ print("");} ?>/></td></tr>
<tr><td width='262' class='tekst'>HEREN 3<sup>e</sup> DIVISIE</td><td><input type="radio" name="klasse" id="Heren 3de Divisie" value="Heren 3de Divisie" <?php if ($klasse == "Heren 3de Divisie") {print("checked= \"checked\"");} else{ print("");} ?>/></td><td width='193'><span class="tekst">DAMES 3<sup>e</sup> DIVISIE</span></td><td
width='41' class='tekst'><input type="radio" name="klasse" id="Dames 3de Divisie" value="Dames 3de Divisie" <?php if ($klasse == "Dames 3de Divisie") {print("checked= \"checked\"");} else{ print("");} ?>/></td></tr>
<tr><td width='262' class='tekst'>HEREN Top KLASSE</td><td><input type="radio" name="klasse" id="Heren Top Klasse" value="Heren Top Klasse" <?php if ($klasse == "Heren Top Klasse") {print("checked= \"checked\"");} else{ print("");} ?>/></td><td width='193'><span class="tekst">DAMES Top KLASSE</span></td><td
width='41' class='tekst'><input type="radio" name="klasse" id="Dames Top Klasse" value="Dames Top Klasse" <?php if ($klasse == "Dames Top Klasse") {print("checked= \"checked\"");} else{ print("");} ?>/></td></tr>
<tr><td width='262' class='tekst'>HEREN 1<sup>e</sup> KLASSE</td><td><input type="radio" name="klasse" id="Heren 1ste klasse" value="Heren 1ste klasse" <?php if ($klasse == "Heren 1ste klasse") {print("checked= \"checked\"");} else{ print("");} ?>/></td><td width='193'><span class="tekst">DAMES 1<sup>e</sup> KLASSE</span></td><td
width='41' class='tekst'><input type="radio" name="klasse" id="Dames 1ste klasse" value="Dames 1ste klasse" <?php if ($klasse == "Dames 1ste klasse") {print("checked= \"checked\"");} else{ print("");} ?>/></td></tr>
<tr><td width='262' class='tekst'>HEREN 2<sup>e</sup> KLASSE</td><td><input type="radio" name="klasse" id="Heren 2de klasse" value="Heren 2de klasse" <?php if ($klasse == "Heren 2de klasse") {print("checked= \"checked\"");} else{ print("");} ?>/></td><td width='193'><span class="tekst">DAMES 2<sup>e</sup> KLASSE</span></td><td
width='41' class='tekst'><input type="radio" name="klasse" id="Dames 2de klasse" value="Dames 2de klasse" <?php if ($klasse == "Dames 2de klasse") {print("checked= \"checked\"");} else{ print("");} ?>/></td></tr>
<tr><td width='262' class='tekst'>HEREN 3<sup>e</sup> KLASSE</td><td><input type="radio" name="klasse" id="Heren 3de klasse" value="Heren 3de klasse" <?php if ($klasse == "Heren 3de klasse") {print("checked= \"checked\"");} else{ print("");} ?>/></td><td width='193'><span class="tekst">DAMES 3<sup>e</sup> KLASSE</span></td><td
width='41' class='tekst'><input type="radio" name="klasse" id="Dames 3de klasse" value="Dames 3de klasse" <?php if ($klasse == "Dames 3de klasse") {print("checked= \"checked\"");} else{ print("");} ?>/></td></tr>
<tr><td width='262' class='tekst'>HEREN RECREATIE</td><td><input type="radio" name="klasse" id="Heren Recreatie" value="Heren Recreatie" <?php if ($klasse == "Heren Recreatie") {print("checked= \"checked\"");} else{ print("");} ?>/></td><td width='193'><span class="tekst">DAMES RECREATIE</span></td><td
width='41' class='tekst'><input type="radio" name="klasse" id="Dames Recreatie" value="Dames Recreatie" <?php if ($klasse == "Dames Recreatie") {print("checked= \"checked\"");} else{ print("");} ?>/></td></tr>
<tr><td width='262' class='tekst'>MIXED 2<sup>e</sup>/3<sup>e</sup>
KLASSE</td><td><input type="radio" name="klasse" id="Mixed 2de 3de klasse" value="Mixed 2de 3de klasse" <?php if ($klasse == "Mixed 2de 3de klasse") {print("checked= \"checked\"");} else{ print("");} ?>/></td><td width='193'><span class="tekst">MIXED RECREATIE</span></td><td
width='41' class='tekst'><input type="radio" name="klasse" id="Mixed Recreatie" value="Mixed Recreatie" <?php if ($klasse == "Mixed Recreatie") {print("checked= \"checked\"");} else{ print("");} ?>/></td></tr>
<tr>
<td> </td>
<td><?php if ($verzenden == "true" && empty($klasse)){
print ("Vul uw klasse of divisie in");
}?></td>
<td> </td>
</tr>
<tr>
<td><input type="reset" name="opnieuw" id="opnieuw" value="Gegevens wissen" /></td>
<td><input type="submit" name="verzenden" id="verzenden" value="Verder met inschrijving" />
(altijd 2x klikken)</td>
<td> </td>
</tr>
</form>
</table>
<p class="style1"> </p>
</body>
</html>