In terms of implementing this, am I correct in thinking that I can just put it at the top of any page for which I JUST $POSTed values in order for it to do its magic (so to speak)?
In other words, something like this:
foreach ($POST as $key => &$val) $val = filterinput(INPUT_POST, $key);
$var1 = $POST['stufffrom_other_page_form'];
$var2 = $POST['morestuff_from_other_page_form'];
The foreach would then look for anything that was just posted and then convert it (if need be). My $var1 and $var2 would then be cleansed or not as appropriate to whether magicquotes is enabled?