Page 1 of 1

'magic_quotes_gpc' with multiple form pages

Posted: Tue Dec 30, 2003 3:47 pm
by freetheheel
i'm working on a site that has events posted on it. After the initial entering page i have a verify page with hidden fields, and then i have the page that actually enteres the information into the database. my problem is that when the first form is submitted and it goes to the 'verify' page, it inserts the backslash (\) before the single quote. then, after the form is submitted to the 3rd page it adds another \ before both the backslash and the quote. so when the information is finally submitted into the database it ends up as: don''t or can''t.

how do i fix this?

Posted: Tue Dec 30, 2003 3:57 pm
by Straterra
As I am a newbie, I'm not sure this will work. Try mysql_escape_string.

Posted: Tue Dec 30, 2003 4:23 pm
by McGruff
It's best to turn magic quotes off (if you can) to avoid these sorts of issues.

If not there's stripslashes().

Posted: Tue Dec 30, 2003 4:27 pm
by freetheheel
thanks!