Parse error: syntax error - Please Help!
Posted: Mon Dec 08, 2008 11:56 pm
Hello,
I am having some trouble with processing a simple PHP web form. It needs to collect the data and send the email with the information within XML tags so that our system can grab it and put the details into our online booking system.
the error i get is:
Parse error: syntax error, unexpected T_DNUMBER in /home/totisme/public_html/test/form/aminew.php on line 70
and the php code is:
any help would be apreciated.
Thanks.
I am having some trouble with processing a simple PHP web form. It needs to collect the data and send the email with the information within XML tags so that our system can grab it and put the details into our online booking system.
the error i get is:
Parse error: syntax error, unexpected T_DNUMBER in /home/totisme/public_html/test/form/aminew.php on line 70
and the php code is:
Code: Select all
<?php
// Receiving variables
@$FIRST = addslashes($_POST['FIRST']);
@$SURNAME = addslashes($_POST['SURNAME']);
@$DOB = addslashes($_POST['DOB']);
@$MOBILE = addslashes($_POST['MOBILE']);
@$ALTERNATE = addslashes($_POST['ALTERNATE']);
@$PREFERRED_TIME = addslashes($_POST['PREFERRED_TIME']);
@$AFFID = addslashes($_POST['AFFID']);
@$GETTING_ERECTION = addslashes($_POST['GETTING_ERECTION']);
@$KEEPING_ERECTION = addslashes($_POST['KEEPING_ERECTION']);
@$PREMATURE_EJACULATION = addslashes($_POST['PREMATURE_EJACULATION']);
@$Female_Sexual_Dysfunction = addslashes($_POST['Female_Sexual_Dysfunction']);
@$questionTxt = addslashes($_POST['questionTxt']);
// Validation
if (strlen($FIRST) == 0 )
{
header("Location: error.html");
exit;
}
if (strlen($SURNAME) == 0 )
{
header("Location: error.html");
exit;
}
if (strlen($DOB) == 0 )
{
header("Location: error.html");
exit;
}
if (strlen($MOBILE) == 0 )
{
header("Location: error.html");
exit;
}
if (strlen($PREFERRED_TIME) == 0 )
{
header("Location: error.html");
exit;
}
if (strlen($questionTxt) == 0 )
{
header("Location: error.html");
exit;
}
//Sending Email to form owner
$pfw_header = "From: drew.shardlow@totismedia.com\n"
. "Reply-To: drew.shardlow@totismedia.com\n";
$pfw_subject = "New website booking";
$pfw_email_to = "shardlow@bigpond.net.au";
$pfw_message = "<?xml version="1.0" encoding="utf-8" ?>\n"
. "<MAIL xmlns="http://tempuri.org/HSFM_Mail.xsd">\n"
. "<ENTITY>HSFM</ENTITY>\n"
. "<SUBENTITY>ENQUIRY</SUBENTITY>\n"
. "<PATIENT_NAME>\n"
. "<FIRST>$FIRST</FIRST>\n"
. " <SURNAME>$SURNAME</SURNAME>\n"
. " <AFFID>$AFFID</AFFID>\n"
. "</PATIENT_NAME>\n"
. "<DOB>$DOB</DOB>\n"
. "<PHONE>\n"
. "<MOBILE>$MOBILE</MOBILE>\n"
. "<ALTERNATE>$ALTERNATE</ALTERNATE>\n"
. "</PHONE>\n"
. "<PREFERRED_TIME>$PREFERRED_TIME</PREFERRED_TIME>\n"
. "<QUESTIONNAIRE>\n"
. "<GETTING_ERECTION>$GETTING_ERECTION</GETTING_ERECTION>\n"
. "<KEEPING_ERECTION>$KEEPING_ERECTION</KEEPING_ERECTION>\n"
. "<PREMATURE_EJACULATION>$PREMATURE_EJACULATION</PREMATURE_EJACULATION>\n"
. "<Female_Sexual_Dysfunction>$Female_Sexual_Dysfunction</Female_Sexual_Dysfunction>\n"
. "<HOW_LONG>$questionTxt</HOW_LONG>\n"
. "<QUESTIONNAIRE>\n"
. "</MAIL>\n";
@mail($pfw_email_to, $pfw_subject ,$pfw_message ,$pfw_header ) ;
header("Location: success.html");
?>
Thanks.