Re: ' database problem

From: Date: Sun, 02 Jul 2000 23:42:50 +0000
Subject: Re: ' database problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4413@lists.php.net to get a copy of this message
> Simply, > use the PHP function addslashes() on the string you are inserting into the > database. It will 'escape' any of those pesky user entered problems. Will this work for %s as well? And if not, can anyone explain why putting % in a text string will screw up unpredictably (removes next two characters, or adds 0.000000 to the string, or deletes the entire rest of string, apparently at random; escaping it doesn't seem to solve the problem) with insert (into a MySQL db), but if I go correct it with update, it's just fine? Sue

« previous php.general (#4413) next »