(i'm a complete php newbie, my special subject is java and .net)
thank u for your help!
gm
Code: Select all
<?
$action = "show";
if (!isset($_SERVER)) { $_POST =& $HTTP_POST_VARS; $_SERVER =& $HTTP_SERVER_VARS; }
if(isset($_POST['submit']))
{
if ($email <> null and $firstname <> null and $lastname <> null and $email <> null)
{
$body = "Anfrage von Homepage: \r\n";
$body .= "Daten:\r\n";
$from = "$email";
$to = "xxx@xx.xx";
if (mail("$to","subject","$body","From: $from"))
{
$body = "Vielen Dank für Ihre Anfrage! \r\n\r\n";
$body .= "bla, bla \r\n\r\n";
$from = "xx@xx.xx";
$to = "$email";
if (mail("$to","subject confirmation","$body$","From: $from"))
{
echo "bla bala";
$action = "sent";
}
else
{
echo "Vielen Dank für Ihre Anfrage.";
$action = "sent";
}
}
else
{
$action = "sendError";
echo "Die Email konnte wegen eines technischen Problems nicht gesendet werden!";
}
}
else
$action = "missing";
}
?>gm
edit patrikG: PLEASE EVERYONE: learn to use
Code: Select all
-tags around php-code. Thanks.