Hi Guys,
I’m having a bit of a headache trying to make a form work on my website.
The form is here www.realmealdeal.co.uk/form.php
I worked through the tutorial on the website here http://www.kirupa.com/web/php_contact_form.htm
but I’ve messed the code up somehow on line 20. I’m a bit off a dumb*ss when it comes to even simple code stuff but I thought i’d give it a try as the tutorial was well explained and the easiest i’ve found on the trawl of the net. Even so i’ve mucked it up
Here’s the code bit off php I did
<?php
if(isset($_POST[‘submit’])) {
$to = “ianmnicholls@gmail.com”;
$subject = “Real Meal Deal”;
$name_field = $_POST[‘Pub/Restaurant’];
$email_field = $_POST[‘website’];
$email_field = $_POST[‘offer heading’];
$message = $_POST[‘offer copy’];
$email_field = $_POST[‘street/phone’];
$email_field = $_POST[‘valid’];
$email_field = $_POST[‘email’];
$body = “From: $name_field
Pub/Restaurant: $email_field
website: $email_field
offer heading
$offer copy” $email_field
street/phone: $email_field
valid: $email_field
email:;
echo “Data has been submitted to $to!”;
mail($to, $subject, $body);
} else {
echo “blarg!”;
}
?>
When I fill in the form and click send it comes up with this
Parse error: syntax error, unexpected T_VARIABLE in /homepages/9/d187402498/htdocs/real/mailer.php on line 20
on the mailer page
http://www.realmealdeal.co.uk/mailer.php
If it’s not too much trouble could someone please tell me where i’m going wrong as it’s hurting my head!
Thanks