laurieballard Posted July 23, 2008 Share Posted July 23, 2008 Hello I have a form on my website that runs a php script to email the form to my address. I have managed to get the form to email itself to me but the details do not appear in the email. Here is the script: <?php $emailsubject = 'Contact Form'; $webMaster = '[email protected]'; $fullname = $_POST['fullname']; $email = $_POST['email']; $telnumber = $_POST['telnumber']; $address1 = $_POST['address1']; $address2 = $_POST['address2']; $town = $_POST['town']; $postcode = $_POST['postcode']; $machinetype = $_POST['machinetype']; $os = $_POST['os']; $querytype = $_POST['querytype']; $other = $_POST['other']; $details = $_POST['details']; $body = <<<EOD Full Name: $fullname Email Address: $email Tel Number : $telnumber Address Line 1: $address1 Address Line 2: $address2 Town: $town Postcode: $postcode Machine Type: $machinetype Operating System: $os Query Type: $querytype Other: $other Details: $details EOD; $headers = "From: $email\r\n"; $headers .= "Content=type: text/html\r\n"; mail($webMaster, $emailsubject, $body, $headers); header('Location: thanks.html'); ?> Obviously i have made sure al the variable names are correct. This is all i get in the email: -----Original Message----- From: Sent: 23 July 2008 19:27 To: [email protected] Subject: Contact Form Full Name: Email Address: Tel Number : Address Line 1: Address Line 2: Town: Postcode: Machine Type: Operating System: Query Type: Other: Details: The php script is obviously being processed when the users clicks submit but the details the user types in are not being sent with the form. Any help would be apreciated. The form actual is here: http://www.complain2.co.uk/pcsite/quote.html Quote Link to comment https://forums.phpfreaks.com/topic/116269-help-with-php-form-script/ Share on other sites More sharing options...
.josh Posted July 23, 2008 Share Posted July 23, 2008 viewing source of quote.html shows you have methos = 'post' instead of method = 'post' Quote Link to comment https://forums.phpfreaks.com/topic/116269-help-with-php-form-script/#findComment-597882 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.