kaliedoscope
02-26-2007, 01:02 PM
Gday Guys
Are am having some problems with a PHP form. It seems i keep getting a PHP error which i cannot fix. I am new to web page development and this is my first site.
If anyone can help, the website is Toucan Club (http://www.toucanclub.com.au)
Go to Crew and fillin the form and this is the error i get....
Parse error: parse error in C:\Inetpub\vhosts\toucanclub.com.au\httpdocs\Crew.php on line 59
And here is the PHP code...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<?php
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Adobe GoLive" />
<title>Untitled Page</title>
<link href="css/basic.css" type="text/css" rel="stylesheet" media="all" />
</head>
<body bgcolor="#ffffff">
<p><?php
// Website Contact Form Generator
// http://www.tele-pro.co.uk/scripts/contact_form/
// This script is free to use as long as you
// retain the credit link
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['Email']));
$EmailTo = "info@helivisuals.com.au";
$Subject = "Crew Application";
$Crew = Trim(stripslashes($_POST['Crew']));
$FirstName = Trim(stripslashes($_POST['FirstName']));
$LastName = Trim(stripslashes($_POST['LastName']));
$ContactPhone = Trim(stripslashes($_POST['ContactPhone']));
$BirthDay = Trim(stripslashes($_POST['BirthDay']));
$BirthMonth = Trim(stripslashes($_POST['BirthMonth']));
$BirthYear = Trim(stripslashes($_POST['BirthYear']));
$Address = Trim(stripslashes($_POST['Address']));
$State = Trim(stripslashes($_POST['State']));
$PostCode = Trim(stripslashes($_POST['PostCode']));
$Country = Trim(stripslashes($_POST['Country']));
$Otherdetails = Trim(stripslashes($_POST['Other Details']));
// validation
$validationOK=true;
if (Trim($Crew)=="") $validationOK=false;
if (Trim($Email)=="") $validationOK=false;
if (Trim($ContactPhone)=="") $validationOK=false;
if (Trim($FirstName)=="") $validationOK=false;
if (Trim($LastName)=="") $validationOK=false;
if (Trim($Address)=="") $validationOK=false;
if (Trim($State)=="") $validationOK=false;
if (Trim($PostCode)=="") $validationOK=false;
if (Trim($Country)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html">";
exit;
}
// prepare email body text
($Body) .= "Crew: "; // <--------this is line 59!
$Body .= $Crew;
$Body .= "\n";
$Body .= "FirstName: ";
$Body .= $FirstName;
$Body .= "\n";
$Body .= "LastName: ";
$Body .= $LastName;
$Body .= "\n";
$Body .= "ContactPhone: ";
$Body .= $ContactPhone;
$Body .= "\n";
$Body .= "Address: ";
$Body .= $Address;
$Body .= "\n";
$Body .= "Birthday: ";
$Body .= $Birthday, $BirthMonth, $BirthYear;
$Body .= "\n";
$Body .= "State: ";
$Body .= $State;
$Body .= "\n";
$Body .= "PostCode: ";
$Body .= $PostCode;
$Body .= "\n";
$Body .= "Country: ";
$Body .= $Country;
$Body .= "\n";
$Body .= "Other Details: ";
$Body .= $Otherdetails;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.html">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html">";
}
?></p>
</body>
</html>
Are am having some problems with a PHP form. It seems i keep getting a PHP error which i cannot fix. I am new to web page development and this is my first site.
If anyone can help, the website is Toucan Club (http://www.toucanclub.com.au)
Go to Crew and fillin the form and this is the error i get....
Parse error: parse error in C:\Inetpub\vhosts\toucanclub.com.au\httpdocs\Crew.php on line 59
And here is the PHP code...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<?php
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Adobe GoLive" />
<title>Untitled Page</title>
<link href="css/basic.css" type="text/css" rel="stylesheet" media="all" />
</head>
<body bgcolor="#ffffff">
<p><?php
// Website Contact Form Generator
// http://www.tele-pro.co.uk/scripts/contact_form/
// This script is free to use as long as you
// retain the credit link
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['Email']));
$EmailTo = "info@helivisuals.com.au";
$Subject = "Crew Application";
$Crew = Trim(stripslashes($_POST['Crew']));
$FirstName = Trim(stripslashes($_POST['FirstName']));
$LastName = Trim(stripslashes($_POST['LastName']));
$ContactPhone = Trim(stripslashes($_POST['ContactPhone']));
$BirthDay = Trim(stripslashes($_POST['BirthDay']));
$BirthMonth = Trim(stripslashes($_POST['BirthMonth']));
$BirthYear = Trim(stripslashes($_POST['BirthYear']));
$Address = Trim(stripslashes($_POST['Address']));
$State = Trim(stripslashes($_POST['State']));
$PostCode = Trim(stripslashes($_POST['PostCode']));
$Country = Trim(stripslashes($_POST['Country']));
$Otherdetails = Trim(stripslashes($_POST['Other Details']));
// validation
$validationOK=true;
if (Trim($Crew)=="") $validationOK=false;
if (Trim($Email)=="") $validationOK=false;
if (Trim($ContactPhone)=="") $validationOK=false;
if (Trim($FirstName)=="") $validationOK=false;
if (Trim($LastName)=="") $validationOK=false;
if (Trim($Address)=="") $validationOK=false;
if (Trim($State)=="") $validationOK=false;
if (Trim($PostCode)=="") $validationOK=false;
if (Trim($Country)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html">";
exit;
}
// prepare email body text
($Body) .= "Crew: "; // <--------this is line 59!
$Body .= $Crew;
$Body .= "\n";
$Body .= "FirstName: ";
$Body .= $FirstName;
$Body .= "\n";
$Body .= "LastName: ";
$Body .= $LastName;
$Body .= "\n";
$Body .= "ContactPhone: ";
$Body .= $ContactPhone;
$Body .= "\n";
$Body .= "Address: ";
$Body .= $Address;
$Body .= "\n";
$Body .= "Birthday: ";
$Body .= $Birthday, $BirthMonth, $BirthYear;
$Body .= "\n";
$Body .= "State: ";
$Body .= $State;
$Body .= "\n";
$Body .= "PostCode: ";
$Body .= $PostCode;
$Body .= "\n";
$Body .= "Country: ";
$Body .= $Country;
$Body .= "\n";
$Body .= "Other Details: ";
$Body .= $Otherdetails;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.html">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html">";
}
?></p>
</body>
</html>