syntax error

0 votes
asked May 5, 2012 by Gemma Hughes (1 point)
Hi, i been trying to get my php code to work but i have a message at the top of my dreamweaver interface saying syntax error on line 17.

this is what is on line 17 - <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>

this was already in my template and i have not touched it, so why have I had this message, and the php aint working because of it.

Any help would be much appreciated, thanks

Gemz x

3 Answers

0 votes
answered May 6, 2012 by Cornelia Cornflake (880 points)
Er ... kinda need to see the whole thing. The line itself could be perfectly acceptable but being wrongly interpreted because of what's ahead of it.
0 votes
answered May 6, 2012 by Gemma Hughes (1 point)
<?php
$to = "cylchmeithringroeslon@hotmail.co.uk";
$subject = "enquiry from Cylch Website";
$message =
"Customer Name:    " . $_POST['name'] . "\r\n" .
"Customer Email:   " . $_POST['email'] . "\r\n" .
"Customer Phone Number:  " . $_POST['phone'] . "\r\n" .
"\r\n" .
"How did customer hear about us:    " . $_POST['heard'] . "\r\n" .
"More information:    " . $_POST['info'] . "\r\n" .
"Customer child attending:   " . $_POST['child'] . "\r\n" .
"Did customer find the website helpfull:  " . $_POST['help'] . "\r\n" ;
$from = $_POST['email'];
$headers = "From: $From" . "\r\n";
mail($to,$subject,$message,$headers);
?>


<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/cylch meithrin.dwt" codeOutsideHTMLIsLocked="false" -->
<head>

I aint getting the email with the info from the form either, pretty new to web designing :)
0 votes
answered May 6, 2012 by Gemma Hughes (1 point)
<?php
$to = "cylchmeithringroeslon@hotmail.co.uk";
$subject = "enquiry from Cylch Website";
$message =
"Customer Name:    " . $_POST['name'] . "\r\n" .
"Customer Email:   " . $_POST['email'] . "\r\n" .
"Customer Phone Number:  " . $_POST['phone'] . "\r\n" .
"\r\n" .
"How did customer hear about us:    " . $_POST['heard'] . "\r\n" .
"More information:    " . $_POST['info'] . "\r\n" .
"Customer child attending:   " . $_POST['child'] . "\r\n" .
"Did customer find the website helpfull:  " . $_POST['help'] . "\r\n" ;
$from = $_POST['email'];
$headers = "From: $From" . "\r\n";
mail($to,$subject,$message,$headers);
?>


<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/cylch meithrin.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
commented May 6, 2012 by Cornelia Cornflake (880 points)
I meant the whole script rather than the whole line (obscure any personal info obviously)!
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
...