Do You Filter?

PHP, Uncategorized 1 Comment

A new PHP feature you might have missed (I know I did until I stumbled onto it recently) is the Data Filtering extension, which made its debut in PHP 5.2.0. This extension provides a set of functions for both validating and filtering of external data, such as users' form inputs.

These functions are each controlled as to what sort of filtering/validating they do by a set of pre-defined constants. See the Data Filtering Introduction page of the manual for a list of the currently available filters. As an example of its potential utility in the simplification of your code, consider the validation of email address formats. Probably the most commonly used technique for this is to use a regular expression comparison. The most thorough implementation of such a function I've encountered is this one I found at iamcal.com:

Read the rest...

Excuse Our Mess

Uncategorized No Comments

I've dived into the theme I was using for this blog to change to a new color scheme and appearance (featurning my best friend Noggin reminding me how unimportant he thinks all this computer stuff is). Looks like I got the main parts working OK, but there is still some tweaking to do. Hopefully I'll have it cleaned up within the next day or two.

2008/07/12: I've finished fixing things (to the best of my knowledge). Let me know if you run into any problems with the display of any pages.