gfoisy Posted December 16, 2008 Author Share Posted December 16, 2008 I went into the server side php.ini and turned it off there. Only the first one was on... the other two related ones were off. Make sense? Quote Link to comment https://forums.phpfreaks.com/topic/137219-mysql_real_escape_string/page/2/#findComment-716991 Share on other sites More sharing options...
gfoisy Posted December 16, 2008 Author Share Posted December 16, 2008 It read like this, so I turned off the first one: ; Magic quotes ; ; Magic quotes for incoming GET/POST/Cookie data. magic_quotes_gpc = On ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. magic_quotes_runtime = Off ; Use Sybase-style magic quotes (escape ' with '' instead of \'). magic_quotes_sybase = Off Quote Link to comment https://forums.phpfreaks.com/topic/137219-mysql_real_escape_string/page/2/#findComment-716997 Share on other sites More sharing options...
rhodesa Posted December 16, 2008 Share Posted December 16, 2008 ok...you turned them off...restarted apache... ran that code i gave you again and get: "Magic Quotes Disabled" ?? then run your script...does it work? Quote Link to comment https://forums.phpfreaks.com/topic/137219-mysql_real_escape_string/page/2/#findComment-717037 Share on other sites More sharing options...
gfoisy Posted December 16, 2008 Author Share Posted December 16, 2008 Not sure what happened, but now it works! I can edit and add new records and just type normally with apostrophes and it works perfectly. No clue. BUT.... THANKS!!! You ROCK! Quote Link to comment https://forums.phpfreaks.com/topic/137219-mysql_real_escape_string/page/2/#findComment-717042 Share on other sites More sharing options...
rhodesa Posted December 16, 2008 Share Posted December 16, 2008 magic quotes is similar to mysql_real_escape_string() in that it adds slashes before some characters. with it on, you are double escaping characters Quote Link to comment https://forums.phpfreaks.com/topic/137219-mysql_real_escape_string/page/2/#findComment-717053 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.