hey leute
mein kontaktformular schickt mir keine mails,jedoch sagt er wenn man es ausfüllt (das formular) Mail erfolgreich gesenden?! ich verstehe das nicht mher
woran liegst?
ich habe es mal hier geuploaded: http://www.beispiel123.kilu.de
mein kontaktformular schickt mir keine mails,jedoch sagt er wenn man es ausfüllt (das formular) Mail erfolgreich gesenden?! ich verstehe das nicht mher
PHP-Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Kontaktformular HILFE!!!!</title>
</head>
<body>
<?php
$fehler = "";
$an = "torben-g-vz@web.de";
$betreff = "";
$vormane = htmlspecialchars($_POST["vorname"]);
$nachname = htmlspecialchars($_POST["nachname"]);
$telefon = htmlspecialchars($_POST["telefon"]);
$email= htmlspecialchars($_POST["email"]);
$nachricht = htmlspecialchars($_POST["nachricht"]);
$datum = date("d.m.Y.h.m.s");
$antwort = "Nein." ;
if(isset($_POST["submit"]))
{
if (empty($_POST["vorname"]))
{
$fehler .= "Fehler!";
echo "Bitte geben Sie ihren Vornamen an!<br />";
}
if (empty($_POST["nachname"]))
{
$fehler .= "Fehler!";
echo "Bitte geben Sie ihren Nachnamen an!<br />";
}
if (empty($_POST["email"]))
{
$fehler .= "Fehler!";
echo "Bitte geben Sie ihre E-mail an, damit wir sie erreichen koennen!<br />";
}
if (empty($_POST["nachricht"]))
{
$fehler .= "Fehler!";
echo "Bitte geben Sie ihre Nachricht ein!<br />";
}
if($_POST[""] == "on")
{
$antwort = "Ja.";
}else $antwort ="Nein.";
if($fehler == "")
{
$inhalt = "Datum der Mail:" . $datum . chr(10) .
"Vorname:" . $vorname . chr(10) .
"Nachname:" . $nachname . chr(10) .
"Telefon:" . $telefon . chr(10) .
"E-Mail:" . $email . chr(10) .
"Nachricht:" . $nachricht . chr(10) .
"Rueckantwort:" . $antwort;
mail($an, $betreff, $inhalt);
echo "Ihre Mail wurde erfolgreich gesendet!" ;
}
}
?>
<form method="post" action=" <?php echo $_SERVER['SCRIPT_NAME']; ?> ">
<table border ="1px">
<tr>
<td>Vorname*:</td>
<td><input type="text" name="vorname" /></td>
</tr>
<tr>
<td>Nachname*:</td>
<td><input type="text" name="nachname" /></td>
</tr>
<tr>
<td>Telefon:</td>
<td><input type="text" name="telefon" /></td>
</tr>
<tr>
<td>Email*:</td>
<td><input type="text" name="email" /></td>
</tr>
<tr>
<td valign="top">Nachricht*:</td>
<td><textarea name="nachricht" rows="10" cols="40"></textarea></td>
</tr>
<tr>
<td>Rueckantwort:</td>
<td><input type="checkbox" name="checkbox" /></td>
</tr><tr>
<td> </td>
<td><input type="submit" name="submit" value="Senden!" /></td>
</tr>
</table>
</form>
</body>
</html>
ich habe es mal hier geuploaded: http://www.beispiel123.kilu.de
Kommentar