Page 1 of 1

Not sure when to use stripslashes

Posted: Mon Jan 25, 2010 8:18 am
by green_coder
I really confused with stripslashes when being used to escape from quotes mysql_real_escape_string()

I always use it when trying to INSERT or UPDATE data so that i wont get any quote "\" inside my database..

When SELECT and DELETE data, i only used mysql_real_escape_string($value)
is this correctly used???

Thanks

Re: Not sure when to use stripslashes

Posted: Mon Jan 25, 2010 8:51 am
by requinix
Keep using mysql_real_escape_string.

stripslashes is only for when you have magic_quotes enabled - that's an entirely separate issue.