Re: escape your variables

From: Date: Thu, 05 Mar 2009 04:02:51 +0000
Subject: Re: escape your variables
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-289337@lists.php.net to get a copy of this message
Actually no; you said "You only need to escape data coming from a user going in to your database."
Using a known variable in my app is not going to cause an sql injection problem. switch ($value) { case 'x':
    $my_field = 1;
break; default:
    $my_field = 0;
} an insert here with no escaping on $my_field will never cause sql injection. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#289337) next »