Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

magic quotes

Status
Not open for further replies.

yebaws

Technical User
Mar 22, 2007
42
GB
Hello,

I am getting a lot of added backslashes in data that has been inserted and then modified and called from a database. When sending to the database I have been using mysql_real_escape_string. As I understand it, when I use this, backslashes will be inserted in front of quotes etc before the query is sent to the database, but these backslashes will then be removed and not stored in the database. So that when I call the data again I should get no backslashes and not need to use stripslashes. I'm guessing that the slashes mean that my php installation must have magic quotes turned on (I can see that there *are* backslashes in the db).

1. Other than asking my ISP (which takes a looooong time) is there a quick way to tell if magic quotes is turned on?
2. And if it is turned on, can I safely dispense with mysql_real_escape_string to get rid of my backslashes?
 
This is not a mysql forum. I would suggest you woudl get a better answer there.

"NOTHING is more important in a database than integrity." ESquared
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top