$aa = false;
if(isset($_POST['name']))
{
$aa = true;
$name = $_POST['name'];
$phone = $_POST['phone'];
$mail = $_POST['mail'];
$text = $_POST['text'];
$name = eregi_replace('<','', $name);
$phone = eregi_replace('<','', $phone);
$mail = eregi_replace('<','', $mail);
$text = eregi_replace('<','', $text);
$sendtime = date('d.m.Y \u\m H:i:s', time());
$message = "W E B A N F R A G E\n\ngesendet: ".$sendtime."\n\nName: ".$name."\nTelefon: ".$phone."\nE-Mail: ".$mail."\n\nAnfrage:\n\n".$text."\n\n";
$empfaenger = 'info@barthel-bamberg.de';
$betreff = 'Webanfrage';
$nachricht = $message;
$header = 'From: webmaster@barthel-bamberg.de' . "\r\n" .
'Reply-To: webmaster@barthel-bamberg.de' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($empfaenger, $betreff, $nachricht, $header);
}
?>