The Input class fetches data from GET, POST, COOKIE or SERVER and offer methods for validation and sanitation.
// Initiate class $Input = new Input; // fetches the key 'name' from GET // returns an object $name = $Input->get ('name'); echo 'Hello, ', $name->value ('Guest'); // prints 'Guest' if 'name' is not set or invalid.
$name = $Input->get ('name')->apply_filters (FILTER_VALIDATE_STRING); if ($name->is_valid() // 'name' is validated as string, but let's check some more. if ($name->validate ('is_alnum')) { // 'name' is now validated as an alpha-numerical string } }