I\'m quite frustrated. I want to be able to insert into my database names with single quotes - for example, O\'Connor.
So, when inserting into the DB, I do:
I dont check for get_magic_quotes_gpc is on/off.
get_magic_quotes_gpc
I just do $lname = mysql_real_escape_string(stripslashes($_POST['lname'])); so if there is not any quoted text it wont strip slashes.. if there is quoted it will strip them off.
$lname = mysql_real_escape_string(stripslashes($_POST['lname']));
and it works wonders for me!