Re: Escape Data In/Out of db [solved]

From: Date: Sun, 12 Apr 2009 00:18:08 +0000
Subject: Re: Escape Data In/Out of db [solved]
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-291375@lists.php.net to get a copy of this message
tedd wrote: >> I think you want to look for magic_quotes_gpc >> >> >> -- >> Thanks! >> -Shawn > > > -Shawn: > > You were right. > > I'll fix it. > > Thanks, > > tedd I normally have a prep4display() and prep4store() type function that do all of the sensitization/prep for either storing or displaying. So prep4display() has a check for magic_quotes_gpc for which it does stripslashes() if they are on and then htmlentities() etc.. and the prep4store() can do mysql_real_escape_string() and whatever else. -Shawn

« previous php.general (#291375) next »