include ("db.php"); ?>
|
if (empty($insertname)){
if ($lan==de) {print "Fehler im Feld Name: Es muss ein Name angegeben werden. zurück";} if ($lan==it) {print "Errore nel campo Nome: Si deve indicare un nome. indietro";} exit(); } if (strstr($insertname,";") || strstr($insertname,"#") || strstr($insertname,"$") || strstr($insertname,"?") || strstr($insertname,"(") || strstr($insertname,")") || strstr($insertname,"=")){ if ($lan==de) {print "Fehler im Feld Namen: Einige Symbole werden nicht akzeptiert. Bitte wiederholen! zurück";} if ($lan==it) {print "Errore nel campo Nome: Alcuni simboli indicati non vengono accettati. Riprovare! indietro";} exit(); } if (empty($insertland)){ if ($lan==de) {print "Es muss ein Land ausgewählt werden. zurück";} if ($lan==it) {print "Errore nel campo Paese: Si deve indicare un paese. indietro";} exit(); } /* if (!strstr($insertmail,"@")){ print "Errore nel campo email: Manca il simbolo @! indietro"; exit(); } if (!strstr($insertmail,".")){ print "Errore nel campo email: Manca un punto! indietro"; exit(); } if(!eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,4}$", $insertmail)){ print "Errore nel campo email: Email non valida. indietro"; exit(); } */ if (empty($inserttext)){ if ($lan==de) {print "Felher im Feld Nachricht: Man muss eine Nachrict eingeben. zurück";} if ($lan==it) {print "Errore nel campo messaggio: Si deve indicare un messaggio. indietro";} exit(); } include_once 'Captcha.php'; $controller = new Captcha(); if($controller->isValid(htmlentities($_POST['number']))) { $name = mysql_escape_string(htmlentities(strip_tags($_POST["insertname"]))); $email = mysql_escape_string(htmlentities(strip_tags($_POST["insertemail"]))); $homepage = mysql_escape_string(htmlentities(strip_tags($_POST["inserthomepage"]))); $text = mysql_escape_string(htmlentities(strip_tags($_POST["inserttext"]))); $ip = $_SERVER["REMOTE_ADDR"]; $datum=date("d.m.Y - H:i:s",time()); $q="INSERT into gtbook (name,email,homepage,land,text,ip,zeit) VALUES ('$name','$email','$homepage','$insertland','$text','$ip','$datum')"; $result= mysql_query($q) or die ("Fehler - Errore - Error : $q." . mysql_error()); if ($result) { echo "
back';} exit(); ?> |