PHP - Snippets
Aus Wikizone
Clean up POST und GET
Zusätzliche Sicherheit für Post und Get.
function clean($elem) {
/* used to add some security to get and post vars */
if(!is_array($elem))
$elem = htmlentities($elem,ENT_QUOTES,"UTF-8");
else
foreach ($elem as $key => $value)
$elem[$key] = $this->clean($value);
return $elem;
}