PHP contact form not forwarding form details to email...
For some strange unbeknown reason my contact form has just stopped working in that it no longer submits any of the form details to the email address I have set up in the script.
The contact form does re-direct to the thanks.htm file once the approapriate field data has been completed and then submitted, its just it ends at that point..!
I tested the PHP / contact form on several occasions whilst live and on every occasion I had the form details come through to my email account, so Im at a loss as to why it has just stopped ?
My code for the PHP and HTML is as follows should anyone anyone be kind enough to look at it : (Domain is also www.bfdesigns.co.uk)
/* Set e-mail recipient */
$myemail = "firstname.lastname@example.org";
$company = ($_POST['company']);
$firstname = ($_POST['firstname']);
$thanksurl = "http://bfdesigns.co.uk/thanks.htm" ;
$errorurl = "http://bfdesigns.co.uk/error.html" ;
/*Redirects the user to the error page if JS is disabled and the form is submitted*/
/* Redirects the visitor to the thanks page */
/* Prepare the message for the e-mail */
$message = "You have a new Web design enquiry from:
Company name: $company
Client name: $firstname
Clients e-mail: $email
Clients message: $enquiry
End of message
/* Sends the message using mail() function */
mail($myemail, $email, $message);
<form action="contact.php" method="post" name="contactForm" onsubmit="return validateForm()">
<p><span>*</span> Must be completed to submit the form</p>
<input type="text" name="company"/>
<label id="completeField"><span>*</span> Name:</label>
<input type="text" name="firstname" id="firstname"/>
<input type="text" name="email"/>
<textarea name="enquiry" rows="4" cols="10"></textarea>
<input type="submit" value="Submit" id="submit" />