Page 1 of 1

Best way to add validation

Posted: Sun Dec 02, 2007 3:25 pm
by arpowers
Hey guys,
I need to add all the validation functionality to my site...

what is the best way to accomplish this? By that I mean, should I use a pre-packed solution and if so, which one?

\Best\

Andrew

Posted: Sun Dec 02, 2007 3:48 pm
by s.dot
If you're already going with an existing solution, I doubt there's just a third party validating solution that can easily be tied in.

Here's what you need to look for, or implement yourself

1. Checking for magic_quotes_gpc
2. If you're expecting a certain result, make sure your data is one of the ones you're expecting.
3. Analyze input data by making sure it looks like what you want.. eg. is_int(), is_numeric() and perhaps use type casting to make it want you want
4. If entering into a database, always escape the string, to prevent sql injection

are the basics

Posted: Mon Dec 03, 2007 3:09 am
by jmut

Posted: Mon Dec 03, 2007 7:49 am
by staar2