Re: MultSelect ListBox hell!

From: Date: Wed, 22 Sep 2004 15:38:56 +0000
Subject: Re: MultSelect ListBox hell!
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-36340@lists.php.net to get a copy of this message
From: "Ford, Mike" <M.Ford@leedsmet.ac.uk>
if (is_array($_POST['state'])){
This check isn't really necessary in PHP, since $_POST['state'] will *always* be an array if the form field has NAME='state[]', even if only 1 is selected.
But remember that the form comes from the client. Just because you create the form with "state[]", that doesn't mean I'm going to send it that way. ;) If it was changed, it could cause an error that might expose file structure or whatever. So the check is a good thing to ensure nothing was changed. ---John Holmes...

« previous php.db (#36340) next »