I get the error "Parse error: parse error, unexpected T_STRING in /home/nlfc/ENotes/submit2.php on line 14" thwn my script runs. thanks got any help.

here is the code:

<?php

$yourName = $REQUEST['yourName'];
$yourEmail = $
REQUEST['yourEmail'];

$headers = "Content-Type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $yourName <$yourEmail>\r\n";

$message = '<html>
<body>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Thank you
for your submmission to New Life's E-Notes</strong><br>
<br>
You have added your name as $yourName <br>
And Your Email address as $yourEmail</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Please add myemail@gmail.com
to your Safe Senders List so you the email goes in your inbox, not in your junkmail</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">If you have any
questions or need to be removed from New Life E-Notes at anytime please Email
us @ e-notes@newlifesd.com</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Thank You,<br>
New Life E-Notes<br>
myemail@gmail.com</font></p>
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>New Life
<br>
www.NewLife.com</strong></font></p>
</body>
</html>';

mail("$yourEmail", "Welcome $yourName To New Life E-Notes", "$message", "$headers");

mail("myemail@gmail.com", "Please Add $yourName E-Notes", "$message", "$headers");

?>

    In this line here:

    <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Thank you
    for your submmission to New Life's E-Notes</strong><br>
    <br>

    The echo is trying to close out in the apostrophe in Life's.

    You need to escape the quote with the backslash... Life\'s

      And as a precursor to what will inevitably be your next question, variables will not parse inside single quotes. You're going to want to use braces around them or concatenate them.

        Write a Reply...