Link to error
And here is the code...
<?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 = "mcpastore@gmail.com";
//the subject of the email sent by the form
$mail_subject = "Link Submission";
//the name of the buisness or website that the form contacts
$buisness_name = "Michael Pastore";
$name="";
$reply="";
$message="";
$send="";
//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'])."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>Submit a Link</title>
</head>
<body>
<?=$html?>
</body>
</html>
First time looking at PHP in over a year after programming with VB6 at work, so rusty is an understatement.