View Single Post

  #4 (permalink)  
Old 03-27-2008
ndlarsen
 
Posts: n/a
Default Re: addslashes/mysql_real_escape_string

Lars Eighner wrote:

> See the best practices example in the article on mysql_real_escpae_string in
> the manual. For portability you need to check for whether magic quotes are
> on and reverse them if they are. If portability is not a concern and it is
> your own machine, you can turn magic quotes off and save a few steps.


I appreciate your reply. What baffles me is that is seems
mysql_real_escape_string() is only run on the values one is using for a
given database query, not the data inserted into the database. So there
is no change made to the data in the database and there is no reason to
run a function in order to strip the data of slashes? Is this so?

Regards

ndlarsen
Reply With Quote