Hi Folks, I am not too familiar with PHP but did manage to get a simple contact form together but while the data seems to get submitted okay, the email I get in empty and comes from 'INVALID_ADDRESS@.SYNTAX-ERROR.' which puzzles me very much...! The other thing I would like to implement is a redirection to a web page after users submit the form. Any help/tips would be much appreciated! You can see the form (html) here - http://www.lalydesign.co.uk/organicspirit-1/contact_test.php And this is the PHP code (send_contact.php) I am using to process the data <?php // Contact subject $subject ="$subject"; // Details $message="$detail"; // Mail of sender $mail_from="$customer_mail"; // From $header="from: $name <$mail_from>"; // Enter your email address $to ='pierrick419@yahoo.co.uk'; $send_contact=mail($to,$subject,$message,$header); // Check, if message sent to your email if($send_contact){ echo "We've received your contact information"; } else { echo "ERROR"; } ?> Cheers P
Shouldn't it be something like <?php // Contact subject $subject = $_POST['subject']; // Details $message = $_POST['detail']; // Mail of sender $mail_from = $_POST['customer_mail']; // From $header = "from: $name <$mail_from>"; // Enter your email address $to = 'pierrick419@yahoo.co.uk'; $send_contact = mail($to,$subject,$message,$header); // Check, if message sent to your email if($send_contact){ echo "We've received your contact information"; } else { echo "ERROR"; } ?> PHP: Untested but basically your send_contact.php file needs to get the details from the form so you use $_POST['xxxxxx']