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 Link to comment https://forums.phpfreaks.com/topic/217475-php-script-query/ 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. Link to comment https://forums.phpfreaks.com/topic/217475-php-script-query/#findComment-1129076 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: <[email protected]>' . "\r\n"; mail($_POST['[email protected]'], $msg_subject, $message, $headers); echo "An Order has been sent. Thank you"; ?> Link to comment https://forums.phpfreaks.com/topic/217475-php-script-query/#findComment-1129081 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. Link to comment https://forums.phpfreaks.com/topic/217475-php-script-query/#findComment-1129092 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.