Re: newbie mail() function

From: Date: Wed, 07 Feb 2001 16:52:26 +0000
Subject: Re: newbie mail() function
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-38565@lists.php.net to get a copy of this message
"April" <april@ponymail.com> wrote: > Your ''s in your strings are the problem. They need to be escaped, or they > will create a parse error. Not true. They (quotes inside a string) only need to be escaped if they are the same style as the quotes enclosing the string. And for those that don't know what "escaping" is it means prefixing them with a backslash (\). So if you enclose a string in double quotes single double quotes must be escaped and if you enclose a string in single quotes single quotes in the string must be escaped. And enclosing a string in single quotes has a different effect than enclosing in in double quotes. See a post I made yesterday about this or search the archives for more details. > Instead of > $msg = "Sender's Full Name:\t$user_name\n"; > you should have > > $msg = "Sender\'s Full Name:\t$user_name\n"; It doesn't hurt to make the change above, but it doesn't help with the actual problem (missing semicolon). -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/

« previous php.general (#38565) next »