Ok I've added the hidden field 'validate' but can't figure where to put that piece of code you gave me, I suspect it goes in the middle.
Does the IF statement need and ELSE to go with it.
Sorry for the questions, I'm a designer not a coder lol
PHP Code:
<?php
$Name = $_POST['Name'];
$EmailFrom = $_POST['EmailFrom'];
$Company = $_POST['Company'];
$Message = $_POST['Message'];
$validate = $_POST['Validate'];
$ewho="hello@#########.co.uk";
$datesent=date("l dS of F Y h:i A");
$ip=$_SERVER['REMOTE_ADDR'];
$subject="Contact";
$mailhead="From: $EmailFrom";
$mailbody ="This email was sent via the website form" . "\n\n";
$mailbody .="Name: " . "$Name" . "\n\n";
$mailbody .="Email: " . "$EmailFrom" . "\n\n";
$mailbody .="Company: " . "$Company" . "\n\n";
$mailbody .="Message: " . "$Message" . "\n\n";
$mailbody .="DATE: " . "$datesent" . "\n";
$body .=stripslashes($mailbody);
mail($ewho,$subject,$body,$mailhead);
?>
Bookmarks