Also ich habe jetzt ein Feedback Formular Tutorial gefunden:
<?php
//This is the location of your sendmail variable
//if you don't know, contact your sysadmin
$mail_path = "/usr/sbin/sendmail -i -t";
//The email address to be receiving emails from this form
$mail_to = "zan@stargeek.com";
//the subject of the email sent by the form
$mail_subject = "Contact Form";
//the name of the buisness or website that the form contacts
$buisness_name = "Stargeek";
//this is the html of the form used to create the email
$form_html = '$html = "
<h1>
To Contact $buisness_name:
</h1>
<form action="$PHP_SELF" method="post">
<table class="mainText" border="0" cellspacing="5">
<tr>
<td>Your Name: </td>
<td>$name </td>
</tr>
<tr>
<td>Your Email Address:</td>
<td>$reply<td>
</tr>
<tr>
<td colspan="2" align="center">Your Message</td>
</tr>
<tr>
<td colspan="2" align="center">$message</td>
</tr>
<tr>
<td colspan="2" align="center">$send</td>
</tr>
</table>
</form>
Script by <a href="http://www.stargeek.com">Stargeek</a>
";';
ini_set("sendmail_from", $mail_from);
ini_set("sendmail_path", $mail_path);
if ($_POST)
{
if($_POST['userEmail'])
{
if( mail($mail_to,$mail_subject,"\t From: ".$_POST['userName']."\n \t Email: ".$_POST['userEmail']. "\n\n\n\n".stripslashes($_POST['userMessage']).'this email was generated by <a href="http://www.stargeek.com">Stargeek</a>'s script'.,"From: $_POST[userEmail]\r\n"."Reply-To: $_POST[userEmail]\r\n") )
{
$html = 'Thank you for contacting '.$buisness_name.', '.$_POST['userName'].'. <br/>Your email was sent <br/>Script by <a href="htp://www.stargeek.com">Stargeek</a>';
}
else
{
$html = 'There was an error';
}
}
}
else
{
$message = '<textarea name="userMessage" rows="20" cols="70"></textarea>';
$name = '<input type="text" name="userName" size="30">';
$reply = '<input type="text" name="userEmail" size="30">';
$send = '<input type="submit" name="submit" value="Send">';
eval($form_html);
}
?>
<html>
<head>
<title>-{Title Here}-</title>
</head>
<body>
<?=$html?>
</body>
</html>
alerdings kommen immer wieder Fehler: wie
Parse error: parse error, unexpected T_IF in sendmail.php on line 51
woran liegt das?