filterFake.php
Source of filterFake.php
<?php
/* filterFake.php
a very sneaky solution to PHP6 compatibility
create temporary filter_input and filter_has_var commands
until all servers get moved to PHP 6
makes PHP6 code work on PHP5 servers
(but without the security of a real filter_input)
*/
//define constants (although they currently aren't used)
define ("INPUT_GET", 1);
define ("INPUT_POST", 2);
function filter_input($type, $field){
$newVar = $_REQUEST["$field"];
return $newVar;
} // end filter_input
function filter_has_var($type, $field){
if (isset($_REQUEST["$field"])){
$varExists = TRUE;
} else {
$varExists = FALSE;
} // end if
return $varExists;
} // end function
function filter_input_array($type){
$theArray = $_REQUEST;
return $theArray;
} // end function
?>