mysql and php question: the magic_quotes_gpc is set to 1. when i echo it to the browser, it shows the added slashes. i inserted these same values into a database. when i read the database values and printed them, i forgot to use stripslashes. but i was surprised to see that the slashes were already removed. now i know this depends on magic_quotes_runtime, which i checked, was OFF, so how did the slashes get removed without me explicitly doing so?
what's more interesting is that when i view the data in the table using phpMyAdmin, the quote i put wasn't escaped with a backslash. when i tried to do a dump/export of the table, the output showed a backslash before the quote. so how come? the slashes should be showing when i say SELECT * FROM MYTABLE.
abs
I think this is why people recommend that you *don't* use PHP's magic quotes.
I hit this problem in a few areas and decided to turn it off.
Use PHP's functions:
stripslashes() and addslashes()
You'll be sorry later if you don't, and continue using magic quotes...
-- Daniel Kasak IT Developer * NUS Consulting Group* Level 18, 168 Walker Street North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]