Re: using htmlentities with data in textarea

From: Date: Tue, 13 Jul 2004 15:38:26 +0000
Subject: Re: using htmlentities with data in textarea
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190360@lists.php.net to get a copy of this message
Hull, Douglas D wrote:
But if one enters: w' my word ends up w\'
Run stripslashes() on the entire string before you begin processing it. If you eventually insert the data into the database, you'll need to run addslashes() on it though, to prevent errors/sql injection from the unescaped quotes. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.general (#190360) next »