I wanted to do this at the top of some of my pages (supplemented by some other more specific validation, of course).
It seems right to me - but I just wanted to have you guys appraise it for me before I put it on my site. Thanks.
foreach($_GET as $key => $value) {
$_GET[$key] = mysql_real_escape_string($value);
}
foreach($_POST as $key => $value) {
$_POST[$key] = mysql_real_escape_string($value);
}