Search the Community
Showing results for tags 'slashes'.
-
In the section, Securing Query Data, the use of stripslashes is given. It works when only one blog entry is being displayed. However, when several blog entries are being displayed using the mysql_fetch_array() on page 361-365 of the book, I can't elimate the slashes that are placed in front of single and double quotes from the database fields 'title' and 'entry'. I'm using PHP version 5.2.17. I'd like to turn magic quotes off, if that's what's causing the problem. GoDaddy's PHP Info indicates the following regarding Magic Quotes (the two columns on the right represent local value, master value): Local Master magic_quotes_gpc On On magic_quotes_runtime Off Off magic_quotes_sybase Off Off I can't find a help topic on GoDaddy about turning magic quotes off. Maybe they recognize that having them turned off threatens their servers? Anyway, I suspect the problem is that the variable being stripped in the security section of PHP for the Web isn't an array, and the fetch array, of course, is. I've tried placing the "stripslashes()" function in every possible position in Script 12.7, but nothing seems to work. Any suggestions?
- 7 replies
-
- magic quotes
- slashes
-
(and 1 more)
Tagged with: