On Mon, June 26, 2006 2:06 am, Jochem Maas wrote: >> if (!get_magic_quotes_gpc()) { >> if (isset($_POST)) { >> foreach ($_POST as $key => $value) { >> $_POST[$key] = trim(addslashes($value)); >> } >> } >> >> if (isset($_GET)) { >> foreach ($_GET as $key => $value) { >> $_GET[$key] = trim(addslashes($value)); >> } >> } >> } If this is all your code is trying to do, then you might as well turn on Magic Quotes GPC in the first place, which means you've got bigger problems than this already... If it's just some legacy code you need to get running, fine and dandy. If this is a new project you are starting on, find a more recent tutorial about Magic Quotes and SQL Injection attacks before you go any further. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php