Jump to content

[SOLVED] Unexpected $end?


DJTim666

Recommended Posts

Please tell me if you find something wrong here.

 

<?php

$sender = stripslashes($_POST['name']);
$to = "***************";
$subject = "Order - Plutonic Nightmare";
$name = stripslashes($_POST['name']); 
$email = stripslashes($_POST['email']);
$items = stripslashes($_POST['items']);
$pets = stripslashes($_POST['pets']);
$other = stripslashes($_POST['other']);
$graphics = stripslashes($_POST['graphics']);
$traditional = stripslashes($_POST['traditional']);
$digital = stripslashes($_POST['digital']);
$write = stripslashes($_POST['write']);
$plot = stripslashes($_POST['plot']);
$message = stripslashes($_POST['message']);

if ($message == ""){

echo "Sorry, but you forgot to explain the project. Please go back and try 

again";
} elseif ($email == ""){

echo "Sorry, but you forgot to give us an email. Please go back and try 

again.";

} elseif ($name == ""){

echo "Sorry, but you forgot to give us a name. Please go back and try 

again";

} else {


$mail_body =<<<EOD

Completed Art Form

Name: $name

Email: $email

Items: $items

Pets: $pets

Other Stuff: $other

Graphics: $graphics

Traditional Art: $traditional

Digital Artwork: $digital

Writing: $write

Plots: $plot

Project Explained: $message

EOD;

//send mail

$headers = $mail_body;
$headers = "From: $sender";

if (mail($to, $subject, $headers)){

echo "The email has been sent successfully.";

} else { 

echo "ERROR: Email not sent";

}

?>

 

It is saying;

 

Parse error: syntax error, unexpected $end in /home/trukki4/public_html/games/mail.php on line 75

 

Any help is greatly appreciated.

 

--

DJ

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.