|  | Posted by Jerry Stuckle on 01/12/07 19:44 
Ruben van Engelenburg wrote:> lawrence k wrote:
 >
 >> I'm working at two different companies right now, and so I'm dealing
 >> with 2 different servers, but I've been using this same class in all my
 >> code. One one server I have to uncomment the line with stripslashes. On
 >> the other server I need to leave it commented. Surely there is a way to
 >> make this code  work on all servers?
 >>
 >
 > Hi Lawrence,
 >
 > Just a guess: check your magic_quotes_gpc setting in php.ini. If it's
 > set to on turn it off and just use stripslashes and addslashes.
 >
 > Ruben.
 
 Yes, check your magic_quotes_gpc.  But don't use addslashes on data to
 be used in a MySQL query.  Use mysql_real_escape_string() instead.
 That's what it's for - and it is charset sensitive.  addslashes() is not.
 
 --
 ==================
 Remove the "x" from my email address
 Jerry Stuckle
 JDS Computer Training Corp.
 jstucklex@attglobal.net
 ==================
  Navigation: [Reply to this message] |