Re: cleaning user input from forms

From: Date: Fri, 21 Jul 2000 14:31:11 +0000
Subject: Re: cleaning user input from forms
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7568@lists.php.net to get a copy of this message
Hi Folks: I sent this the other day and haven't heard anything from anyone. I'd really appreciate some feedback on this. Thanks, --Dan Daniel Convissor wrote: > > I have functions that validate all user input submitted from forms. One of > the steps is making sure no nasty characters make their way into my code or > database. This step is performed through the following command: > > $Out = substr( ereg_replace("[^A-Za-z0-9._@-]", "", $In), 0, 500 ); > > What I'm wondering about... are there characters, or combinations thereof, > that would trip even this up? If so, what would be a better way to perform > this needed task. > > I poked around the mailing list archives for answers but didn't find anything > on the mark. > > Thanks, > > --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y More than just answers. Solutions. (SM) http://www.analysisandsolutions.com/ 4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#7568) next »