$gesamtok = false;
$tageok = true;
$anredeok = true;
$vornameok = true;
$nameok = true;
$landok = true;
$adresseok = true;
$plzok = true;
$ortok = true;
$emailok = true;
$mittagok = true;
$abendok = true;
$firmaok = true;
$fehler = "";
if(trim($mittag)=="") { $mittag = 0; }
if(trim($abend)=="") { $abend = 0; }
if ($anmeldung == "ja") {
if (!($saturday == "ja" || $sunday == "ja")) {
$tageok = false; $fehler = "Bitte geben Sie an welche Kongresstage Sie buchen möchten.";
}
if (trim($anrede) == "keiner") { $anredeok = false; $fehler = "To complete your registration we need to know your title."; }
if (trim($vorname) == "") { $vornameok = false; $fehler = "To complete your registration we need to know your first name."; }
if (trim($name) == "") { $nameok = false; $fehler = "To complete your registration we need to know your surname."; }
if (trim($land) == "") { $landok = false; $fehler = "To complete your registration we need to know the country you live in."; }
if (trim($adresse) == "") { $adresseok = false; $fehler = "To complete your registration we need to know your address."; }
if (trim($plz) == "") { $plzok = false; $fehler = "To complete your registration we need to know your postcode."; }
if (trim($ort) == "") { $ortok = false; $fehler = "To complete your registration we need to know the city you live in."; }
list($id, $domain) = split('@', trim($email));
list($second, $top) = split('\.', $domain);
if (strlen($id) < 2) { $emailok = false; $fehler = "To complete your registration we need to know your valid email."; }
if (strlen($second)< 2) { $emailok = false; $fehler = "To complete your registration we need to know your valid email."; }
if (strlen($top) < 2 ) { $emailok = false; $fehler = "To complete your registration we need to know your valid email."; }
if (!($mittag == "0" || $mittag == "1" || $mittag == "2")){
$mittagok = false;
$fehler = "Please fill in a valid value for the midday buffets (0, 1 or 2).";
}
if (!($abend == "0" || $abend == "1")){
$abendok = false;
$fehler = "Please fill in a valid value for the evening meals (0 or 1).";
}
if ($anredeok && $vornameok && $nameok && $landok && $adresseok && $plzok && $ortok && $emailok && $mittagok && $abendok && $tageok && $firmaok) { $gesamtok = true; }
} else {
if($kontrolle_retour != "ja"){
$saturday = "ja";
$sunday = "ja";
$anrede = "keiner";
}
}
?>