Jump to content

[SOLVED] Email Script Errors


Akenatehm

Recommended Posts

Hey Guys, I am trying to make a contact form email.php script.

 

Here is the error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/kaurlcom/public_html/relay/relay_site/email.php on line 40

 

Here is the code:

<?PHP

if(isset($_POST['submit']))

{

   $name=$_POST['name'];

   $email=$_POST['email'];
   
   $description=$_POST['description'];

   if(strlen($name)<1)

   {

      print "You did not enter a Name.";

   }

   else if(strlen($email)<1)

   {

      print "You did not enter a password.";

   }
   
    else if(strlen($description)<1)

   {

      print "You did not enter a Description.";

   }

   else

   {
$subject =  "Contact Enquiry From:" '$email';
$message = 	"Name: '$name' \n
			Email: '$email' \n
			Description: '$description;' \n";
$from = "From: '$email' \n";
mail ("[email protected]" , $subject, $message, $from);
   }

}


?>

Link to comment
https://forums.phpfreaks.com/topic/134726-solved-email-script-errors/
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.