my contact formular is not running. can somone say what is wrong?
nger = "mail@mydomain.de";
if($_REQUEST['Send'])
{
if(empty($_REQUEST['Name']) || empty($_REQUEST['Email']) || empty($_REQUEST['Nachricht']))
{
echo"Bitte geh <a href=\"javascript:history.back();\">zurück</a> und füll alle Felder aus!";
}
else
{
$Mailbetreff = "Kontakt: ";
$Mailbetreff .= $_REQUEST['Betreff'];
$Trenner = md5(uniqid(time()));
$Header = "From: ".$_REQUEST['Email'];
$Header .= "\n";
$Header .= "MIME-Version: 1.0";
$Header .= "\n";
$Header .= "Content-Type: multipart/mixed; boundary=$Trenner";
$Header .= "\n\n";
$Header .= "This is a multi-part message in MIME format";
$Header .= "\n";
$Header .= "--$Trenner";
$Header .= "\n";
$Header .= "Content-Type: text/plain";
$Header .= "\n";
$Header .= "Content-Transfer-Encoding: 8bit";
$Header .= "\n\n";
$Header .= "Sie haben folgende Nachricht erhalten: \n\n";
while(list($Formularfeld, $Wert) = each($_REQUEST))
{
if($Formularfeld != "Send" && $Formularfeld != "Anhang")
{
$Header .= $Formularfeld.": ".$Wert."\n";
}
}
$Header .= "\nDatum/Zeit: ";
$Header .= date("d.m.Y H:i:s");
$Header .= "\n";
$Header .= "--$Trenner";
$Header .= "\n";
$Header .= "Content-Type: ";
$Header .= $_FILES['Anhang']['type'];
$Header .= "; name=";
$Header .= $_FILES['Anhang']['name'];
$Header .= "\n";
$Header .= "Content-Transfer-Encoding: base64";
$Header .= "\n";
$Header .= "Content-Disposition: attachment; filename=";
$Header .= $_FILES['Anhang']['name'];
$Header .= "\n\n";
$Dateiinhalt = fread(fopen($_FILES['Anhang']['tmp_name'], "r"), $_FILES['Anhang']['size']);
$Header .= chunk_split(base64_encode($Dateiinhalt));
$Header .= "\n";
$Header .= "--$Trenner--";
mail($Empfaenger, $Mailbetreff, "", $Header);
echo"Vielen Dank für Deine Bewerbung! Ich werde mich in Kürze bei Dir melden";
}
else
{
?>
<table border="0" cellpadding="1" cellspacing="2">
<form action="<?php echo$_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data" method="post">
<tr>
<td align="right">Vorname:</td>
<td colspan="2"><input name="Name" size="26" type="text"></td>
</tr>
<tr>
<td align="right">Nachname:</td>
<td colspan="2"><input name="Nachname" size="26" type="text"></td>
</tr>
<tr>
<td align="right">Geburtsdatum:</td>
<td colspan="2"><input name="Geburtsdatum" size="26" type="text"></td>
</tr>
<tr>
<td align="right">Wohnort:</td>
<td colspan="2"><input name="Wohnort" size="26" type="text"></td>
</tr>
<tr>
<td align="right">Telefon:</td>
<td colspan="2"><input name="Telefon" size="26" type="text"></td>
</tr>
<tr>
<td align="right">Email:</td>
<td colspan="2"><input name="Email" size="26" type="text"></td>
</tr>
<tr>
<td align="right">Größe:</td>
<td colspan="2"><input name="Groesse" size="26" type="text"></td>
</tr>
<tr>
<td align="right">Gewicht:</td>
<td colspan="2"><input name="Gewicht" size="26" type="text"></td>
</tr>
<tr>
<td align="right">Erfahrungsstand:</td>
<td colspan="2"><select name="Erfahrung" size="1"><option>keine Erfahrung als Model</option><option>mittelere Erfahrung</option><option>Profimodel</option></select></td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td align="right">mögliche Einsatzbereiche:</td>
<td><input type="checkbox" name="Portrait" value="ON"> Portrait</td>
<td><input type="checkbox" name="Fashion" value="ON"> Fashion</td>
</tr>
<tr>
<td align="right"> </td>
<td><input type="checkbox" name="Dessous" value="ON"> Dessous</td>
<td><input type="checkbox" name="Bademoden" value="ON"> Bademoden</td>
</tr>
<tr>
<td align="right"> </td>
<td><input type="checkbox" name="Teilakt" value="ON"> Teilakt</td>
<td><input type="checkbox" name="Akt" value="ON"> Akt</td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"><input type="checkbox" name="Fetisch" value="ON"> Fetisch</td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td align="right" colspan="3">
<p align="left">Bist Du mit einer Veröffentlichung der Fotos in den Medien
einverstanden?</td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"><input type="radio" value="V1" checked name="R1"> ja
<input type="radio" name="R1" value="V2"> nein</td>
</tr>
<tr>
<td align="right" colspan="3"> </td>
</tr>
<tr>
<td align="right">Anmerkungen, Fragen <br>
und Wünsche:<br>
</td>
<td colspan="2"><textarea cols="21" name="Nachricht" rows="7"></textarea></td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td align="right">Foto:</td>
<td colspan="2"><input name="Anhang" size="10" type="file"></td>
</tr>
<tr>
<td align="center" colspan="3"> </td>
</tr>
<tr>
<td align="center" colspan="3"> <input name="Send" type="submit" value="Abschicken"> <input name="Reset" type="reset" value="Löschen"></td>
</tr>
</form>
</table>
<?php
}
?>
</body>
</html>