have you tried using addslashes()?
http://www.php.net/addslashes
nik
> -----Original Message-----
> From: Adam Hewett [mailto:ahewett@m...]
> Sent: Thursday, March 07, 2002 3:37 PM
> To: professional php
> Subject: [pro_php] //'s, data type magic quotes problem
>
>
> ok here's the problem. I made a script that accepts a form's data and
> mails out a confirmation, and mails the information to the appropriate
> people. the mails are HTML encoded. I used a separate script for the html
> encoding.
>
> I have a text box on the form that should be able to accept quotes. but
> this is what happens:
>
> if I type in this: this is just a "test"
>
> it will come out like this: this is just a \\
>
> it will cut off all of the text after the first quote.
>
> I have the variable in the middle of the add->html as '." $variable ".'
>
> any ideas on how to fix this?