Your ''s in your strings are the problem.  They need to be escaped, or they
will create a parse error.

Instead of
$msg = "Sender's Full Name:\t$user_name\n";
you should have
> $msg = "Sender\'s Full Name:\t$user_name\n";


----- Original Message -----
From: "Angerer, Chad" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 10:36 AM
Subject: [PHP] newbie mail() function


> Hello!
>
> I am very new to php programming. I have been experimenting around with
> php's mail function and html forms.
>
> I have a generic HTML form with user_name, email_address, comments, and
> like_site as inputs on the HTML
> form. I have the following code in a seperate php file which the form
calls:
>
> <?php
>
> $msg = "Sender's Full Name:\t$user_name\n";
> $msg .= "Sender's Email Address:\t$email_address\n";
> $msg .= "User Comments:\t$comments\n";
> $msg .= "Did you like the site?\t$like_site\n\n";
>
> $mailheaders = "From: My Web Site\n"
> 9>$mailheaders .= "Reply-To: $email_address\n\n";
>
> mail("[EMAIL PROTECTED]", "Feedback Form", $msg, $mailheaders);
>
> echo ("Thank you $user_name\n<br>");
> echo ("I appreciate your feedback\n\n");
>
> ?>
>
> for some reason I get a parse error on line 9.  If I remove the
mailheaders
> variables the PHP script works
> just fine and emails the form to the correct address.  Any help on this
> would be appreciated.
>
> It is probably something qyite simple.  I just don't see it though.
>
> Thanks.
>
> Chad
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to