[nycphp-talk] Syntax question (was handling forms (relative newbie))
Aaron Fischer
agfische at email.smith.edu
Mon Oct 6 15:57:22 EDT 2003
Quick question: I noticed on some posts to my original question the
syntax for accessing an array element of $_POST or $_SESSION uses
single quotes around the array element. In the reference book I am
using there are no quotes, just something like $_SESSION[first_name].
I googled a number of discussions and articles and have found examples
of both methods.
So, my question is, does it matter if one uses the single quotes or no
quotes as both seem to work? Are there any security issues or other
nuances I should be aware of or is the language just forgiving in this
respect and I could choose either way?
TIA,
-Aaron
On Friday, October 3, 2003, at 03:34 pm, Chris Shiflett wrote:
> 1. Validate $_POST['foo']
> 2. Validate $_POST['bar']
> 3. $_SESSION = $_POST
> 4. $_SESSION['blah'] is used somewhere important
More information about the talk
mailing list