Jump to content

php script query


racercam

Recommended Posts

<?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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.