Re: about $_post

From: Date: Thu, 19 Sep 2002 18:59:20 +0000
Subject: Re: about $_post
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-116923@lists.php.net to get a copy of this message
> $_POST[ID] > Since there are no quotes around the variable name ID and no dollar sign in > front of it, PHP will look for a constant named ID and if one is not found > it will blow chow. Depending on your error_reporting() level whether this "warning" is reported or not. Better to not use this method, though. > $_POST ['ID'] > Should work find, assuming a variable named ID came from your form. However, > I wouldn't get in the habit of writing my arrays like this. It's confusing > to say the least. What habit would you recommend? This is the way to do it. Not sure why the spaces are there, but without them, this is the way you should write your arrays. ---John Holmes...

« previous php.general (#116923) next »