Jump to content

[SOLVED] What's this? > Parse error: parse error, unexpected '=' in \\


Benjee

Recommended Posts

Hey all,

Firstly can I say sorry if what I'm asking makes no sense whatsoever... I'm really not the best with code  ;D

 

I've made what I thought would be a simple contact/information submission form, based on code that I'd found on the web.

 

When submit the form I get a white page appear with the following message on:

 

Parse error: parse error, unexpected '=' in \\nas38ent\domains\j\jamjee.co.uk\user\htdocs\4weddings\contact.php on line 12

 

Your help would be greatly appreciated, thanks in advance  :) Ben

 

The following code from contact.php:

<?php
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); 
$EmailTo = "forweddingsandaparty@hotmail.com";
$Subject = "FW&AP Contact Form";
$Name = Trim(stripslashes($_POST['Name'])); 
$Tel = Trim(stripslashes($_POST['Tel'])); 
$Email = Trim(stripslashes($_POST['Email'])); 
$Bridals = Trim(stripslashes($_POST['Bridals'])); 
$Formals = Trim(stripslashes($_POST['Formals'])); 
$FacePainting = Trim(stripslashes($_POST['FacePainting'])); 
$Make-up-Evenings = Trim(stripslashes($_POST['Make-up-Evenings'])); 
$EventDate = Trim(stripslashes($_POST['EventDate'])); 
$Suburb = Trim(stripslashes($_POST['Suburb'])); 
$Time = Trim(stripslashes($_POST['Time'])); 
$NoReqMake-up = Trim(stripslashes($_POST['NoReqMake-up'])); 
$Message = Trim(stripslashes($_POST['Message'])); 

// validation
$validationOK=true;
if (Trim($EmailFrom)=="") $validationOK=false;
if (!$validationOK) {
  print "<meta http-equiv=\"refresh\" content=\"0;URL=error.html\">";
  exit;
}

// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Tel: ";
$Body .= $Tel;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Bridals: ";
$Body .= $Bridals;
$Body .= "\n";
$Body .= "Formals: ";
$Body .= $Formals;
$Body .= "\n";
$Body .= "FacePainting: ";
$Body .= $FacePainting;
$Body .= "\n";
$Body .= "Make-up-Evenings: ";
$Body .= $Make-up-Evenings;
$Body .= "\n";
$Body .= "EventDate: ";
$Body .= $EventDate;
$Body .= "\n";
$Body .= "Suburb: ";
$Body .= $Suburb;
$Body .= "\n";
$Body .= "Time: ";
$Body .= $Time;
$Body .= "\n";
$Body .= "NoReqMake-up: ";
$Body .= $NoReqMake-up;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Message;
$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\">";
}
?>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.