Hi,
Some help please. I’m modified a php mail script. The original provided Name, email and message.
I want to use a modified version to provide me with name, email, company and postcode.
I’ve tweaked things in Dreamweaver but php errors on lines :-
13, - $email";
15 - $company";
and 16 - $postcoode";
You can tell I don’t do code - let alone php.
Could someone please point me down the straight and narrow. Would be good to put a line break between each answer as well please?
Many thanks,
Joe.
[php]<?php
session_start();
$name = $_GET[‘name’];
$email = $_GET[‘email’];
$postcode = $_GET[‘postcode’];
$subject = 'New entry via web form, from ’ . $name;
if(strtolower($_REQUEST[‘code’]) == strtolower($_SESSION[‘random_number’]))
{
$TO = "[email protected]";
$h = “From: " . $email;
$content = “$name ($email) sent you the following message :\n\n$name”;
$email”;
$company";
$postcoode";
mail($TO, $subject, $content, $h);
echo 1;
}
else
{
echo 0; // invalid code
}
?>[/php]