I'm in a situation now with a client where I need it to work in PHP 5. Since I'm such a hack with PHP, I'm hoping you on this forum can help.
Here's what's on the Contact page...
And this is what's on the sendeail.php page<!--Email Contact Form-->
<form action="sendeail.php" method="post" name="contact" style="margin: 16px;" onsubmit="return gonogo()">
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />
<!--I've excluded the HTML details and am just showing the form tag, php info and submit button here-->
<p><input name="send" type="submit" class="boldtext" id="send" value="Send Email" style="margin-right:16px;" /></p>
</form>
Any ideas why this won't work in PHP 5?<!--Begin Feedback Messages-->
<p class="body">
<?php
//compare results
if ($html=="True"){
//If results was True, this is a valid user
print "<h1>Thank You!</h1><p>Your message has been sent.</p>";
$todayis = date("l, F j, Y, g:i a") ;
$subject = "Contact from Conquest website.";
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Message: $notes \n
From: $visitor ($visitormail) \n
Web: $visitorweb \n
Phone: $visitorphone \n
Fax: $visitorfax \n
Address: $visitorstreet \n
$visitorcity ($visitorprovince)\n
$visitorcountry ($visitorpc)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral: $httpref \n
";
$from = "From: $visitormail\r\n";
mail('contact@contactemail.com', $subject, $message, $from);
print "Message:</p><div style='border:1px solid #333; width:300px; height:100px; overflow:scroll;'>";
$notesout = str_replace("\r", "<br/>", $notes);
echo $notesout;
print "</div><p><a href='contact.php'>Send another message.</a></p>";
}
if ($html=="False"){
//the user is invalid
print "<h1>ERROR:</h1>Your message did not validate and was not sent.<br/><a href='contact.php'>Please go back</a> and enter the correct Validation Code.";
}
?>
</p>