> From: "1LT John W. Holmes" <[EMAIL PROTECTED]> > >> I'm having a problem escaping double quotes in email messages sent with >> mail(). The message is built as a string and assigned to a variable and > the >> variable name is passed to the mail function. >> >> The double quotes appear correctly in a simple test like this: >> $message = "This message uses 'single' and \"double\" quotes."; >> mail($sendto, $subject, $message, $headers); >> >> But if $message is built in another part of the script and passed as a >> hidden input of a form, the email arrives with the message truncated at > the >> first double quote encountered. If I do a str_replace() on $message to >> escape double quotes, the email shows the escaping backslash but is still >> truncated at the double quote!
[snip] > The way around this is to use htmlentities() or htmlspecialchars() on your > string before you insert it into the value attribute of your form element. > It will come out decoded on the the other side, so you don't have to worry > about that. John, thanks for the fine reply -- problem solved! -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php