News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Luc de Brouwer's Blog:
Never having to use $_GET or $_POST again
August 02, 2010 @ 08:53:35

In a quick post to his blog Luc de Brouwer reminds us that we don't ever need to use $_GET or $_POST directly again thanks to PHP's filter extension.

This doesn't just work for $_GET and $_POST but also for $_SERVER and $_COOKIE variables. Check out the documentation for filter_input() on the PHP website.

He shows how it compares to the filtering that CodeIgniter has to offer with a few code examples - one showing a filtered fetch and the other showing how to grab the raw value from the superglobal (if you really need it, that is).

0 comments voice your opinion now!
filter extension example codeigniter


blog comments powered by Disqus

Similar Posts

Phil Sturgeon's Blog: Video: Set up a REST API with CodeIgniter

DevShed: Tracking a Stack of Function Calls with the Xdebug Extension

PHP Security Blog: Holes in most preg_match() filters

Ilia Alshanetsky's Blog: Filter Extension Revamped (and PHP 5.2 news)

Derek Allard's Blog: Modifying the default CodeIgniter Calendar template for fun and profit


Community Events





Don't see your event here?
Let us know!


install list developer laravel code podcast symfony2 interview refactor threedevsandamaybe series language opinion framework testing unittest introduction release configure community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework