I have this code to validate security:
$tipos = array('$_POST','$_GET','$_COOKIE','$_SESSION','$_FILES');
foreach($tipos as $tipo){
if ( isset($$tipo) && !empty($$tipo) ) {
foreach ($$tipo as $key => $item) {
$tipo[$key] = $this->security->xss_clean($item);
}
}
}
It gives me error of undefined
variable, I know I could validate it one by one, but is there solution like this?