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
https://forums.phpfreaks.com/topic/55778-solved-unexpected-end/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.