2023-05-27 15:05:06 +02:00
|
|
|
|
<?php
|
|
|
|
|
if(isset($_POST['submit'])){
|
2023-05-27 17:16:45 +02:00
|
|
|
|
$vorname = $_POST["vorName"];
|
|
|
|
|
$nachname = $_POST['nachName'];
|
|
|
|
|
$strasse = $_POST['strasse'];
|
|
|
|
|
$hausnummer = $_POST['hausnummer'];
|
|
|
|
|
$plz = $_POST['postleitzahl'];
|
|
|
|
|
$ort = $_POST['ort'];
|
|
|
|
|
$emailrep = $_POST['emailRep'];
|
|
|
|
|
$email = $_POST['email'];
|
|
|
|
|
$passwort = $_POST['passwort'];
|
|
|
|
|
$passwortrep = $_POST['passwortRep'];
|
|
|
|
|
|
2023-05-27 15:05:06 +02:00
|
|
|
|
if(empty($_POST['vorName']) || empty($_POST['nachName']) || empty($_POST['strasse']) ||
|
|
|
|
|
empty($_POST['hausnummer']) || empty($_POST['postleitzahl']) || empty($_POST['ort']) ||
|
|
|
|
|
empty($_POST['emailRep']) || empty($_POST['email']) || empty($_POST['passwort']) || empty($_POST['passwortRep']))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
2023-05-27 17:16:45 +02:00
|
|
|
|
}else if (!preg_match("/^[A-Za-zÄÖÜäöüß -]*$/", $vorname)
|
|
|
|
|
|| !preg_match("/.{2,}/", $vorname)
|
|
|
|
|
|| !preg_match("/(?:([- ])\1{1,}|( -)|(- ))/", $vorname)
|
|
|
|
|
|| !preg_match("/^([A-ZÄÖÜa-zäöüß]{2,}[ -]?)+$/", $vorname)
|
|
|
|
|
|| !preg_match("/(\w)\1{2,}/", $vorname)) {
|
2023-05-26 16:39:10 +02:00
|
|
|
|
|
2023-05-27 17:16:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if (!preg_match("/^[A-Za-zÄÖÜäöüß -]*$/", $nachname)
|
|
|
|
|
|| !preg_match("/.{2,}/", $nachname)
|
|
|
|
|
|| !preg_match("/(?:([- ])\1{1,}|( -)|(- ))/", $nachname)
|
|
|
|
|
|| !preg_match("/^([A-ZÄÖÜa-zäöüß]{2,}[ -]?)+$/", $nachname)
|
|
|
|
|
|| !preg_match("/(\w)\1{2,}/", $nachname)
|
|
|
|
|
|| !preg_match("/[A-ZÄÖÜ][a-zäöüß]+[ ]+[A-ZÄÖÜ][a-zäöüß]+/", $nachname)
|
|
|
|
|
|| !preg_match("/^(von( der)?|zu)[ ][A-ZÄÖÜ]|^[A-ZÄÖÜ]/", $nachname)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if ( !preg_match("/.{2,}/", $strasse)
|
|
|
|
|
|| !preg_match("/^[^0-9]*$|[0-9]$/", $strasse)
|
|
|
|
|
|| !preg_match("/^[A-Za-z0-9ÄÖÜäöüß' -]+$/", $strasse)
|
|
|
|
|
|| !preg_match("/^[A-ZÄÖÜ][ -]?[a-zäöü0-9ß']+([ -]?[A-ZÄÖÜ0-9][A-Za-z0-9ÄÖÜäöüß']+)*$/", $strasse)
|
|
|
|
|
|| !preg_match("/[0-9]$|[a-zäöüß]$/", $strasse)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else if ( !preg_match("/^[0-9]/", $hausnummer)
|
|
|
|
|
|| !preg_match("/^0/", $hausnummer)
|
|
|
|
|
|| !preg_match("/^[A-Za-z0-9ÄÖÜäöüß' -]+$/", $hausnummer)
|
|
|
|
|
|| !preg_match("/^[1-9][0-9]{0,3}[a-z]?$/", $hausnummer)){
|
|
|
|
|
|
|
|
|
|
}else if ( !preg_match("/^(0100[1-9]|010[1-9][0-9]|01[1-9][0-9]{2}|0[2-9][0-9]{3}|[1-9][0-9]{4})$/", $plz)){
|
|
|
|
|
|
|
|
|
|
}else if ( !preg_match("/.{2,}/", $ort)
|
|
|
|
|
|| !preg_match("/[ \/-][ \/-]/", $ort)
|
|
|
|
|
|| !preg_match("/^[A-ZÄÖÜa-zäöüß \/-]+$/", $ort)
|
|
|
|
|
|| !preg_match("/(\w)\1{2,}/", $ort)
|
|
|
|
|
|| !preg_match("/^[A-ZÄÖÜ]/", $ort)
|
|
|
|
|
|| !preg_match("/[a-zäöüß]$/", $ort)
|
|
|
|
|
|| !preg_match("/^[A-ZÄÖÜ][a-zäöüß]+([ -\/][A-ZÄÖÜa-zäöü][a-zäöüß]+)*$/", $ort)){
|
|
|
|
|
|
|
|
|
|
}else if ( !preg_match("/[A-Za-z0-9_!#$%&'*+-\/=?^_`.{|}~]+[@][A-Za-z0-9-]+[.][A-Za-z]{2,}/", $ort)){
|
|
|
|
|
|
|
|
|
|
}else if($email != $emailrep){
|
2023-05-26 16:39:10 +02:00
|
|
|
|
|
2023-05-27 17:16:45 +02:00
|
|
|
|
}else if (!preg_match("/^(?=.*[A-ZÄÖÜ])(?=.*[a-zäöüß])(?=.*[0-9])(?=.*[!°`´@#$%^&*()_+\-=\[\]{};':\"\\|,.<>\/?]).{6,}$/", $hausnummer)
|
|
|
|
|
|| !preg_match("/.{6,}/", $ort)){
|
2023-05-26 16:39:10 +02:00
|
|
|
|
|
2023-05-27 17:16:45 +02:00
|
|
|
|
}else if($passwort != $passwortrep){
|
2023-05-26 16:39:10 +02:00
|
|
|
|
|
2023-05-27 17:16:45 +02:00
|
|
|
|
}else{
|
2023-05-26 16:39:10 +02:00
|
|
|
|
|
2023-05-27 17:16:45 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
?>
|
2023-05-26 16:39:10 +02:00
|
|
|
|
|