function clean_array_for_post($post) {
foreach($post as $key => $value) {
// stripslashes, we don't want to rely on magic quotes
if(get_magic_quotes_gpc()) {
$post[$key] = stripslashes($value);
}
// quote if not a number
if(!is_numeric($value)) {
$post[$key] = mysql_real_escape_string($value);
}
}
return $post;
}