first commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
// FILTER ALL REQUEST
|
||||
if(!function_exists('strip_slash')) {
|
||||
function strip_slash(&$value) {
|
||||
if(is_array($value))
|
||||
{
|
||||
strip($value);
|
||||
}
|
||||
else {
|
||||
$value = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!function_exists('strip')) {
|
||||
function strip(&$request)
|
||||
{
|
||||
if(!is_array($request))
|
||||
{
|
||||
die("Inputan Bukan Array");
|
||||
}
|
||||
array_walk($request, "strip_slash");
|
||||
return $request;
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_REQUEST))
|
||||
{
|
||||
strip($_REQUEST);
|
||||
}
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
strip($_POST);
|
||||
}
|
||||
|
||||
if(!empty($_GET))
|
||||
{
|
||||
strip($_GET);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user