hier ist mein code:
PHP
<?php
error_reporting(0);
$submit = $_POST['submit'];
$author = $_POST['name'];
$email = $_POST['email'];
$text = $_POST['text'];
if ($submit == 'Senden')
{
if ($author == '' AND $text == '' AND $email == '')
{
print "Bitt füllen Sie die Felder aus.";
}
else if ($author == '' OR $text == '' OR $email == '')
{
print "Bitte füllen Sie alle Felder aus.";
}
else {$mailtext = "Vorname, Name: $author\n E-Mail: $email\n Nachricht: $text\n"; mail("philipp@spol.de", "Neue Nachricht von $author bei anver.ch", $mailtext, "From: contact@anver.ch");
print "Danke für die Nachricht ".htmlspecialchars($author).". Ich werde mich so bald wie möglich melden!</p>";
}
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table border=0>
<tr>
<td>Vorname, Name</td>
<td><input name="name" type="text" id="name"></td>
</tr>
<tr>
<td>E-Mail</td>
<td><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td>Nachricht</td>
<td><textarea name="text" rows="6" cols="40" id="message"></textarea></td>
</tr>
</table>
<input type="submit" value="Senden" name="submit" class="send">
<?php
error_reporting(0);
$submit = $_POST['submit'];
$author = $_POST['name'];
$email = $_POST['email'];
$text = $_POST['text'];
if ($submit == 'Senden')
{
if ($author == '' AND $text == '' AND $email == '')
{
print "Bitt füllen Sie die Felder aus.";
}
else if ($author == '' OR $text == '' OR $email == '')
{
print "Bitte füllen Sie alle Felder aus.";
}
else {$mailtext = "Vorname, Name: $author\n E-Mail: $email\n Nachricht: $text\n"; mail("philipp@spol.de", "Neue Nachricht von $author bei anver.ch", $mailtext, "From: contact@anver.ch");
print "Danke für die Nachricht ".htmlspecialchars($author).". Ich werde mich so bald wie möglich melden!</p>";
}
}
?>
Alles anzeigen
was ist falsch??
ihr könnt mir auch auf <!-- e --><a href="mailto:philipp@spol.de">philipp@spol.de</a><!-- e --> schreiben