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: <dimension87@live.co.uk>' . "\r\n";

mail($_POST['dimension87@live.co.uk'], $msg_subject, $message, $headers);

echo "An Order has been sent.  Thank you";

 

?>

Link to comment
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.