Re: Array to String

From: Date: Wed, 28 Jun 2006 01:53:44 +0000
Subject: Re: Array to String
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-238755@lists.php.net to get a copy of this message
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

« previous php.general (#238755) next »