Re: [PHP] Mail - avoid backslash before apostrophe

2003-06-03 Thread Marek Kilimajer
You have magic_quotes on, with this setting php runs addslashes() on every $_REQUEST variable (so you can use them in sql queries right away). So you need to use stripslashes() before sending it as mail. Dillon, John wrote: I have a text box on a web page and submit button. The php code sends t

RE: [PHP] Mail - avoid backslash before apostrophe

2003-06-03 Thread Hardik Doshi
Hi there, I think you need to check magic quotes setting under php.ini. I guess it should be on. Try to make it off and try your mail function. Thanks Hardik Doshi --- "Dillon, John" <[EMAIL PROTECTED]> wrote: > I have a text box on a web page and submit button. > The php code sends the > text

RE: [PHP] Mail - avoid backslash before apostrophe

2003-06-03 Thread Adam Voigt
Umm, try this: $body = str_replace('\'',''',stripslashes($_POST['message'])); mail($to,$subject,$body,"Content-type:text/html\r\n"); On Mon, 2003-06-02 at 11:12, Dillon, John wrote: > I have a text box on a web page and submit button. The php code sends the > text as an email. If the text inc

RE: [PHP] Mail - avoid backslash before apostrophe

2003-06-03 Thread Dillon, John
I have a text box on a web page and submit button. The php code sends the text as an email. If the text includes an inverted comma/apostrophe the email will include a backslash before it, thus: \'. I know how to str_replace in php, but what do I need to replace the apostrophe with to avoid the \