Wie findet ihr es ?
Über verbserrungs Vrschläge würde ich mich freuen!!
PHP-Quellcode
- <html>
- <head>
- <title>Auswertung im Formular</title>
- <meta name="author" content="daniel">
- <meta name="generator" content="Ulli Meybohms HTML EDITOR">
- </head>
- <body text="#0000FF" bgcolor="#C0C0C0">
- <?php
- $name = $_GET['name'];
- $vorname = $_GET['vorname'];
- $geschlecht = $_GET['geschlecht'];
- $hausnummer = $_GET['hausnummer'];
- $post = $_GET['post'];
- $anrede = $_GET['anrede'];
- $passwort = $_GET['passwort'];
- $passwortw = $_GET['passwortw'];
- $wohnort = $_GET['wohnort'];
- $land = $_GET['land'];
- $tag = $_GET['tag'];
- $monat = $_GET['monat'];
- $jahr = $_GET['jahr'];
- $email = $_GET['email'];
- $emailw = $_GET['emailw'];
- $strasse = $_GET['strasse'];
- $bundesland = $_GET['bundesland'];
- $herkunft = $_GET['herkunft'];
- $alter = $_GET['alter'];
- $groesse = $_GET['groesse'];
- $haare = $_GET['haare'];
- $augen = $_GET['augen'];
- $geschlecht1 = $_GET['geschlecht1'];
- //MUSTER ZUR ÜBERPRÜFUNG DER EINGABEN!!!!!!
- $emailmuster = "^[_a-zA-Z0-9-](\.{0,1}[_a-zA-Z0-9-])*@([a-zA-Z0-9-]{2,}\.){0,}[a-zA-Z0-9-]{3,}(\.[a-zA-Z]{2,4}){1,2}$";
- //MUSTER LÄSST BUCHSTABEN VON a-z , A-Z ZU UND SCHLIEßT ZAHlEN UND DIESE SONDERZEICHEN AUS 0-9@§$%&/()=?´`+*~#'-_:;,\.<>|^° AUßERDEM MÜSSEN MINDESTENS 2 BUCHSTABEN EINGEBEB WORDEN SEIN!!!
- $muster = "^[a-zA-Z][^0-9@§$%&/()=?ß+*~#'-_:;,\.<>|^°]{2,}$";
- //MUSTER LÄSST BUCHSTABEN VON a-z , A-Z ZU UND SCHLIEßT ZAHlEN UND DIESE SONDERZEICHEN AUS 0-9@§$%&/()=?´`+*~#'_:;,\.<>|^° AUßERDEM MÜSSEN MINDESTENS 2 BUCHSTABEN EINGEBEB WORDEN SEIN!!!
- $muster1 = "^[a-zA-Z][^0-9@§$%&/()=?´`+*~#'_:;,\.<>|^°]{2,}$";
- //MUSTERPLZ LÄSST ZAHLEN VON 0-9 ZU UND SCHLIEßT AllE BUCHSTABEN a-z , A-Z UND DIESE SONDERZEICHEN AUS a-zA-Z@§$%&/()=?´`+*~#'-_:;,\.<>|^° AUSSERDEM MÜSSEN GENAU 5 ZAHLEN EINGEBEN WORDEN SEIN!!!
- $musterplz = "^[0-9]{5}$";
- //MSUTERHAUS LÄSST ZAHLEN von 0-9 ZU UND ES MUSS MINDESTENS EINE ZAHL EIGEBEN WORDEN SEIN!!!
- $musterhaus = "^[0-9]{2,}[a-zA-Z]{2}$";
- $mustergroesse = "^[0-2]{1}[,,.][0-9]{2}$";
- //MUSTER ENDE
- //FUNKTION OBEN ANFANG
- function oben () {
- global $anrede;
- global $geschlecht;
- global $tag;
- global $monat;
- global $jahr;
- global $post;
- global $hausnummer;
- global $vorname;
- global $name;
- global $wohnort;
- global $strasse;
- global $land;
- global $muster;
- global $musterhaus;
- //BEGINN AUSWERTUNG
- echo'<form action="auswertung.php" method="GET">';
- echo'<p><div align="center"><font color="#FF0000" size="+2">Ihre Persönliche Daten:</font><br></p>';
- if (ereg($muster, $name)){
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Name:</td>';
- echo'<td width="70%"><input type="text" name="name" size="35" maxlength="35" value="'; echo $name; echo'"></input></td>';
- echo'</tr>';
- echo'</table>';
- }else{
- echo'<div align="center"><font color="#FF0000">Bitte überprüfen Sie ihren Eingebenen Namen! Er darf keine Sonderzeichen enthalten!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%"><font color="#FF0000">Name:</font></td>';
- echo'<td width="70%"><input type="text" name="name" size="15" maxlength="15"></input></td>';
- echo'</tr>';
- echo'</table>';
- }
- if (ereg($muster, $vorname)){
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Vorname:</td>';
- echo'<td width="70%"><input type="text" name="vorname" size="35" maxlength="35" value="'; echo $vorname; echo'"></input></td>';
- echo'</tr>';
- echo'</table>';
- }else{
- echo'<div align="center"><font color="#FF0000">Bitte überprüfen Sie ihren Eingebenen Vornamen! Er darf keine Sonderzeichen enthalten!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%"><font color="#FF0000">Vorname:</font></td>';
- echo'<td width="70%"><input type="text" name="vorname" size="15" maxlength="15"></input></td>';
- echo'</tr>';
- echo'</table>';
- }
- if (ereg($muster, $wohnort)){
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Wohnort:</td>';
- echo'<td width="70%"><input type="text" name="wohnort" maxlength="35" value="'; echo $wohnort; echo'">';
- echo'</tr>';
- echo'</table>';
- }else{
- echo'<div align="center"><font color="#FF0000">Bitte überprüfen Sie ihren Eingebenen Wohnort! Er darf keine Sonderzeichen enthalten!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%"><font color="#FF0000">Wohnort:</font></td>';
- echo'<td width="70%"><input type="text" name="wohnort" size="20" maxlength="20"></input></td>';
- echo'</tr>';
- echo'</table>';
- }
- if (ereg($muster, $strasse)){
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Straße:</td>';
- echo'<td width="70%"><input type="text" name="strasse" maxlength="35" value="'; echo $strasse; echo'">';
- echo'</tr>';
- echo'</table>';
- }else{
- echo'<div align="center"><font color="#FF0000">Bitte überprüfen Sie die von ihnen Eingebenen Straße! Sie darf keine Sonderzeichen enthalten!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%"><font color="#FF0000">Straße:</font></td>';
- echo'<td width="70%"><input type="text" name="strasse" size="25" maxlength="25"></td>';
- echo'</tr>';
- echo'</table>';
- }
- if (ereg($muster, $land)){
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Land:</td>';
- echo'<td width="70%"><input type="text" name="land" maxlength="35" value="'; echo $land; echo'"></td>';
- echo'</tr>';
- echo'</table>';
- }else{
- echo'<div align="center"><font color="#FF0000">Bitte überprüfen Sie dias von Ihnen Eingebene Land! Es darf keine Sonderzeichen enthalten!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%"><font color="#FF0000">Land:</td>';
- echo'<td width="70%"><input type="text" name="land" size="15" maxlength="15"></input></td>';
- echo'</tr>';
- echo'</table>';
- }
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td>Geschlecht</td>';
- echo'<td><select name="geschlecht"><option selected>'; echo $geschlecht; echo'</select></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td width="30%">Anrede</td>';
- echo'<td width="70%"><select name="anrede"><option selected>'; echo $anrede; echo'</select></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td>Geburtsdatum </td>';
- echo'<td><select name="tag">';
- echo'<option selected>'; echo $tag; echo'</option>';
- echo'</select>';
- echo'<select name="monat">';
- echo'<option selected>'; echo $monat; echo'</option>';
- echo'</select>';
- echo'<select name="jahr">';
- echo'<option selected>'; echo $jahr; echo'</option>';
- echo'</select></td>';
- echo'</tr>';
- echo'</table>';
- if (ereg($musterhaus, $hausnummer)){
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Hausnummer</td>';
- echo'<td width="70%"><input type="text" name="hausnummer" maxlength="5" size="4" value="'; echo $hausnummer; echo'"></td>';
- echo'</tr>';
- echo'</table>';
- }else{
- echo'<div align="center"><font color="#FF0000">Bitte überprüfen Sie die von Ihnen Eigegebene Hausnummer, sie darf keine Großbuchstaben sowie Sonderzeichen entahlten!!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%"><font color="#FF0000">Hausnummer</font></td>';
- echo'<td width="70%"><input type="text" name="hausnummer" maxlength="5" size="4"></td>';
- echo'</tr>';
- echo'</table>';
- }
- }
- //FUNKTION OBEN ENDE
- //ANFANG FUNKTION ZAHLEN
- function zahlen () {
- global $post;
- global $musterplz;
- if (ereg($musterplz, $post)){
- echo'<table width="100%">';
- echo'<td width="30%">Postleitzahl</td>';
- echo'<td width="70%"><input type="text" name="post" maxlength="5" size="6" value="'; echo $post; echo'">';
- echo'</tr>';
- echo'</table>';
- }else {
- echo'<div align="center"><font color="#FF0000">Bitte überprüfen Sie die von Ihnen Eingebenen Postleitzahl! Sie darf keine Sonderzeichen enthalten!</font></div>';
- echo'<table width="100%">';
- echo'<td width="30%"><font color="#FF0000">Postleitzahl</font></td>';
- echo'<td width="70%"><input type="text" name="post" maxlength="5" size="6">';
- echo'</tr>';
- echo'</table>';
- }
- }
- //ENDEFUNKTION ZAHLEN
- //ANFANG FUNKTION PASSWORT
- function passwort() {
- global $passwort;
- global $passwortw;
- if ($passwort == $passwortw) {
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Passwort</td>';
- echo'<td width="70%"><input type="password" name="passwort" maxlength="35" value="'; echo $passwort; echo'"></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td>Passwort [Kontrolle]</font></td>';
- echo'<td><input type="password" name="passwortw" maxlength="35" value="'; echo $passwortw; echo'"></td>';
- echo'</tr>';
- echo'</table>';
- }else{
- echo'<div align="center"><font color="#FF0000">Die Eingegeben Passwörter stimmen nicht überein , bitte geben Sie sie erneut ein !</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Passwort</td>';
- echo'<td width="70%"><input type="password" name="passwort" maxlength="35" ></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td>Passwort <font size="1">(wiederholen)</font></td>';
- echo'<td><input type="password" name="passwortw" maxlength="35"></td>';
- echo'</tr>';
- echo'</table>';
- }
- }
- //ENDE FUNKTION PASSWORT
- //BEGINN FUNKTION EMAIL
- function email() {
- global $email;
- global $emailw;
- global $emailmuster;
- if ($email == $emailw) {
- if (ereg($emailmuster, $email)) {
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">E-Mail Adresse</td>';
- echo'<td width="70%"><input type="text" name="email" maxlength="40" size="40" value="'; echo $email; echo'"></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td>E-Mail Adresse [Kontrolle]</td>';
- echo'<td><input type="text" name="emailw" maxlength="40" size="40" value="'; echo $emailw; echo'"></td>';
- echo'</tr>';
- echo'</table>';
- }else {
- echo'<div align="center"><font color="#FF0000">Die von Ihnen Angegebenen E-Mail Adressen sind nicht gültig , bitte geben Sie sie erneut ein!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">E-Mail Adresse</td>';
- echo'<td width="70%"><input type="text" name="email" maxlength="40" size="40"></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td>E-Mail Adresse [Kontrolle]</td>';
- echo'<td><input type="text" name="emailw" maxlength="40" size="40"></td>';
- echo'</tr>';
- echo'</table>';
- }
- }else {
- echo'<div align="center"><font color="#FF0000">Die von Ihnen Angegebenen E-Mail Adressen stimmen nicht überein , bitte geben Sie diese erneut ein !</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">E-Mail Adresse</td>';
- echo'<td width="70%"><input type="text" name="email" maxlength="40" size="40"></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td>E-Mail Adresse [Kontrolle]</td>';
- echo'<td><input type="text" name="emailw" maxlength="40" size="40"></td>';
- echo'</tr>';
- echo'</table>';
- }
- }
- //ENDE FUNKTION EMAIL
- //ANFANG FUNKTION UNTEN
- function unten() {
- global $bundesland;
- global $muster1;
- if (ereg($muster1, $bundesland)){
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Bundesland:</td>';
- echo'<td><input type="text" name="bundesland" maxlenght="30" size="30" value="'; echo $bundesland; echo'"></td>';
- echo'</tr>';
- echo'</table>';
- }else{
- echo'<div align="center"><font color="#FF0000">Bitte überprüfen Sie das von Ihnen angebene Bundesland!! Es darf keine Sonderzeichen enthalten!!Mit Ausnahme von " - "!!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Bundesland:</td>';
- echo'<td><input type="text" name="bundesland" maxlenght="30" size="30"></td>';
- echo'</tr>';
- echo'</table>';
- }
- }
- //ENDE FUNKTION UNTEN
- //ANFANG FUNKTION PARTNER
- function partner(){
- global $alter;
- global $groesse;
- global $haare;
- global $augen;
- global $geschlecht1;
- global $herkunft;
- echo'<p><div align="center"><font color="#FF0000" size="+2">Die Wunschdaten für ihren Traumpartner :</font></p>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Herkunft:</td>';
- echo'<td width="70%"><select name="herkunft"><option selected>'; echo $herkunft; echo'</select></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td width="30%">Haarfarbe:</td>';
- echo'<td width="70%"><select name="haare"><option selected>'; echo $haare; echo'</select></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td width="30%">Augen</td>';
- echo'<td width="70%"><select name="augen"><option selected>'; echo $augen; echo'</select></td>';
- echo'</tr>';
- echo'<tr>';
- echo'<td width="30%">Suche:</td>';
- echo'<td width="70%"><select name="geschlecht1"><option selected>'; echo $geschlecht1; echo'</select></td>';
- echo'</tr>';
- echo'</table>';
- if (ereg($mustergroesse, $groesse)) {
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Größe:</td>';
- echo'<td width="70%"><input type="text" name="groesse" maxlength="35" value="'; echo $groesse; echo'"></td>';
- echo'</tr>';
- echo'</table>';
- }else {
- echo'Bitte überprüfen Sie Ihre Eingaben!! Sie dürfen keine Sonderzeichen enthalten';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Größe:</td>';
- echo'<td width="70%"><input type="text" name="groesse" maxlength="35"></td>';
- echo'</tr>';
- echo'</table>';
- }
- if ($alter < "100"){
- if ($alter >"19"){
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%">Alter:</td>';
- echo'<td width="70%"><input type="text" name="alter" maxlength="35" value="'; echo $alter; echo'"></td>';
- echo'</tr>';
- echo'</table>';
- }else {
- echo'<div align="center"><font color="#FF0000">Das mindest Alter beträgt 18 Jahre!!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%"><font color="#FF0000">Alter:</font></td>';
- echo'<td width="70%"><input type="text" name="alter" maxlength="35"></td>';
- echo'</tr>';
- echo'</table>';
- }
- }else {
- echo'<div align="center"><font color="#FF0000">Bitte geben Sie ein realistisches Alter ein!!</font></div>';
- echo'<table width="100%">';
- echo'<tr>';
- echo'<td width="30%"><font color="#FF0000">Alter:</font></td>';
- echo'<td width="70%"><input type="text" name="alter" maxlength="35"></td>';
- echo'</tr>';
- echo'</table>';
- }
- echo'<input type="submit" value="Abschicken">';
- }
- //ENDE FUNKTION PARTNER
- //FUNKTIONEN WE