error_reporting(E_ALL); /************************************************** Formulargenerator v1.0 by 4Webmaster.net Programmed by Borlabs Website: www.borlabs.de visit www.4webmaster.net **************************************************/ $error = false; $errors = array(); $receiver = 'wolfram.sembdner@t-online.de'; function check_email ($string) { // RegEx created by Myle Ott, found at regexlib.com return preg_match('/^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))$/i', $string); } function check_onlynumbers ($string) { return preg_match('/^[0-9,.]{1,}$/', $string); } function check_onlyletters ($string) { return preg_match('/^[a-zA-ZäöüÄÖÜß]{1,}$/', $string); } function send_email ($subject, $body, $receiver, $html = 1) { if ($html != 1) { $body = str_replace('
', "\n", $body); $body = str_replace('
', "\n", $body); $body = strip_tags($body); } $subject = str_replace('\n', '', $subject); $subject = str_replace('\r', '', $subject); if ($html) { $header = 'MIME-Version: 1.0' . "\n"; $header .= 'Content-type: text/html; charset=iso-8859-15'."\n"; $header .= 'From: '.$receiver.' <'.$receiver.'>'."\n"; } else { $header = 'MIME-Version: 1.0' . "\n"; $header .= 'From: '.$receiver.' <'.$receiver.'>'."\n"; } if (mail($receiver, $subject, $body, $header)) { return true; } else { return false; } } function array_stripslashes(&$var) { if(is_string($var)) { $var = stripslashes($var); } else { if(is_array($var)) foreach($var as $key => $value) array_stripslashes($var[$key]); } } if(get_magic_quotes_gpc()){ array_stripslashes($_GET); array_stripslashes($_POST); array_stripslashes($_REQUEST); array_stripslashes($_COOKIE); } if (!empty($_POST)) { // Prüfung für das Feld "Ihre Nachricht" $errors['Kontakt'] = null; if (empty($_POST['Kontakt'])) { $error = true; $errors['Kontakt'] = ' class="error"'; } if (!empty($_POST['Kontakt']) && !check_email($_POST['Kontakt'])) { $error = true; $errors['Kontakt'] = ' class="error"'; } } $_text_Kontakt = (!empty($_POST['Kontakt']) ? htmlspecialchars($_POST['Kontakt'], ENT_QUOTES, 'iso-8859-15') : null); ?> Ihre Nachricht
Ihre Nachricht
Bitte alle mit * markierten Felder ausfüllen.

Formulargenerator by 4Webmaster.net

'; if(send_email('Ihre Nachricht', $body, $receiver)) { ?>

Ihre Nachricht

Vielen Dank für Ihre Nachricht.

Ihre Nachricht

Das Formular konnte leider nicht abgesendet werden. Bitte versuchen Sie es später noch einmal.