Re: HTTP_POST_VARS and Arrays

From: Date: Tue, 04 Jul 2000 14:48:36 +0000
Subject: Re: HTTP_POST_VARS and Arrays
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-4753@lists.php.net to get a copy of this message
Actually isn't that the default behaviour of FORM vars -- if there is no value they do not appear in the transaction on the server side after a submit? Isn't that why we all have to write in those if(!isset(blah)) ... statements? Doens't look to me like anything is busted. -- Erik ----- Original Message ----- From: "Matt Allen" <Matt@LinuxWorx.com.au> To: "Rasmus Lerdorf" <rasmus@php.net> Cc: <php-general@lists.php.net> Sent: Monday, July 03, 2000 11:58 PM Subject: Re: [PHP] HTTP_POST_VARS and Arrays > Hi Rasmus, > > Like this > > <form action=test.php method=POST> > <select name=blah[] MULTIPLE> > <option value=1>One</option> > <option value=2>Two</option> > <option value=3>Three</option> > </select> > </form> > > If you dont select one of the options $blah will not show up on test.php > at all. > > Its pretty weird, thats why i asked. > > Matta > > Rasmus Lerdorf wrote: > > > > > When im walking the HTTP_POST_VARS array im not getting any data from > > > the submitted form if the element in the form was an array. > > > > > > For instance, If it it a multiple select list and nothing is selected > > > then the form element doesnt even appear in the HTTP_POST_VARS array, > > > not even as a NULL. > > > > What do you mean nothing is selected? How do you make a select multiple > > tag without a default selection? > > > > -Rasmus > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > Matt Allen Linux/PHP eCommerce > Solutions > Linux Worx Linux Networking > www.linuxworx.com.au Consulting > matt@linuxworx.com.au > 0413 777 771 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#4753) next »