Home arrow PHP arrow Cleaning up Array Elements, POST and GET Requests with Filters in PHP 5

Cleaning up Array Elements, POST and GET Requests with Filters in PHP 5

Welcome to the final episode of a series that shows you how to use filters in PHP 5. Made up of nine parts, these articles show you how to utilize the numerous checking filters that come with the filter library. You can use them to thoroughly validate the incoming data handled by your PHP programs, without having to spend a long time coding custom functions or class methods.

TABLE OF CONTENTS:
  1. Cleaning up Array Elements, POST and GET Requests with Filters in PHP 5
  2. Review: the FILTER_SANITIZE_STRING filter
  3. Sanitizing strings from GET and Post requests, cookies and sessions
  4. Using callback functions and building arrays of filters
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
September 09, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Naturally, if youíve been a patient reader and already went through the preceding articles of the series, Iím certain that at this point youíll have a solid background in using the filter extension for checking common data types, including email and IP addresses, integers and float numbers, and so forth. In those tutorials I explained how to accomplish all of these tasks with a decent variety of code samples.

Regardless of the features mentioned before, one of the most robust aspects of the filter library is its ability to sanitize strings, something that was covered in depth in the previous chapter. However, the library is also capable of cleaning up strings in arrays, as well in data coming from GET and POST requests and cookies. Therefore, this final article of the series will demonstrate how to do this with a few understandable examples, in this manner concluding this quick introduction to working with the PHP 5 filter library.

So, are you ready to tackle the last episode of this educational journey? Then donít waste more time; start reading now!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: