Re: Re: Bug #13718 Updated: form elements with same name problem

From: Date: Thu, 18 Oct 2001 01:06:02 +0000
Subject: Re: Re: Bug #13718 Updated: form elements with same name problem
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-68175@lists.php.net to get a copy of this message
Matt, why do you care about "proper" coexistance with Javascript. How PHP handles arrays like this simply isn't going to change. If you have a specific thing this prevents you from doing, let us know and we can show you how to solve it. -Rasmus On Thu, 18 Oct 2001, Jani Taskinen wrote: > > Could you please add a short example script into the report which > shows what you mean. > > --Jani > > > On Wed, 17 Oct 2001, Matt Jones wrote: > > >no, this fails any and all javascript definitions. If you attempt to > >reference the "so-called" array you are defining in javascript, it will > >return an error because there is no array. This is simply a hack/feature of > >php, and not the true functionality as defined by html/javascript. I'm not > >asking for a means to get an array > >----- Original Message ----- > >From: "Bug Database" <php-dev@lists.php.net> > >To: <jone1941@yahoo.com> > >Sent: Thursday, October 18, 2001 12:10 AM > >Subject: Bug #13718 Updated: form elements with same name problem > > > > > >> ID: 13718 > >> Updated by: sniper > >> Reported By: jone1941@yahoo.com > >> Old Status: Open > >> Status: Bogus > >> Bug Type: Feature/Change Request > >> Operating System: All > >> PHP Version: 4.0.6 > >> New Comment: > >> > >> Just name them as 'name=varname[]' (add the []'s in the end) > >> and you'll get an array. > >> > >> --Jani > >> > >> > >> Previous Comments: > >> ------------------------------------------------------------------------ > >> > >> [2001-10-17 16:47:11] jone1941@yahoo.com > >> > >> The problem exists in the way that php handles the reception of a posted > >form. If there is more than one element in a form with the same name and it > >is posted to a php page, php handles this by assuming the last element with > >that name is the correct value for that variable. > >> > >> In order to provide a proper coexistance with javascript it should treat > >all variables with that name as elements of an array. > >> > >> ------------------------------------------------------------------------ > >> > >> > >> > >> ATTENTION! Do NOT reply to this email! > >> To reply, use the web interface found at > >http://bugs.php.net/?id=13718&edit=2 > > > > > > > > >

« previous php.dev (#68175) next »