racercam Posted November 1, 2010 Share Posted November 1, 2010 ?> at the end of the script is not bright red. how can i fix it as it seems to be linked with the body text as its the same burgundy colour following on from my my php form error thread Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 1, 2010 Share Posted November 1, 2010 It would be easier to diagnose the code it were visible. Quote Link to comment Share on other sites More sharing options...
racercam Posted November 1, 2010 Author Share Posted November 1, 2010 <?php $msg_subject = "Kleeneze Web Order"; $message = " <html> <head> <title>Kleeneze WEB Order</title> </head> <body> $message = "Full Name: {$_POST['NAME']}\n Address: {$_POST['ADDRESS']}\n Town: {$_POST['TOWN']}\n Post Code: {$_POST['POSTCODE']}\n Phone Number: {$_POST['PHONE']}\n Email: {$_POST['email']}\n include("confirm.html") </body> </html>"; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; // More headers $headers .= 'From: <dimension87@live.co.uk>' . "\r\n"; mail($_POST['dimension87@live.co.uk'], $msg_subject, $message, $headers); echo "An Order has been sent. Thank you"; ?> Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted November 1, 2010 Share Posted November 1, 2010 You have open quotes, unterminated lines, and the include() function in the middle of assigning a string to a variable. You also don't want to use a $_POST var in the mail() function, you want to simply specify the address, or assign the value to a variable, and use it instead. Quote Link to comment 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.