Einmal Quellcode contact.php. Ich hoffe es schmeckt:
<html>
<head>
<title>contact</title>
</head>
<body>
<?php
$Empfaenger = "
horst.honker@gmx.de";
if($_REQUEST['Send'])
{
if(empty($_REQUEST['Name']) || empty($_REQUEST['Email']) || empty($_REQUEST['Nachricht']))
{
echo"Please go back to <a href=\"javascript:history.back();\"></a> and fill out all forms. Thanks.";
}
else
{
$Mailnachricht = "Sie haben folgende Nachricht erhalten: \n\n";
while(list($Formularfeld, $Wert)=each($_REQUEST))
{
if($Formularfeld!="Send")
{
$Mailnachricht .= $Formularfeld.": ".$Wert."\n";
}
}
$Mailnachricht .= "\nDatum/Zeit: ";
$Mailnachricht .= date("d.m.Y H:i:s");
$Mailbetreff = "Kontakt: ";
$Mailbetreff .= $_REQUEST['Betreff'];
mail($Empfaenger, $Mailbetreff, $Mailnachricht, "From: ".$_REQUEST['Email']);
echo"Email is on the way.";
}
}
else
{
echo"An error has occured. Please click <a href=\"contact.php\">Seite</a>.";
}
?>
</body>
</html>