Reply to Re: Retrieving the multiple values set by a form

Your name:

Reply:


Posted by Girish on 12/16/45 11:59

Ron Barnett wrote:
> In the example you have given, which equates to a Get, the variables will
> indeed overwrite each other with only the last value surviving, as stated by
> lorento.
>

Hi Ron and everyone else,

Thanks for your response. Let me expand a bit on my requirement. I have
a dynamically generated form where I am now trying something similiar.
To wit:

<input name='inp[0]' type='checkbox' value='first value'>
<input name='inp[1]' type='checkbox' value='second value'>
<input name='inp[2]' type='checkbox' value='third value'>
..
..
etc

Basically, I present a user with a dynamically generated checklist and
I am trying to see all the values that he has checked.

>
> once this is received by your PHP script the values may be retrieved :
>
> $myArray = $_REQUEST('ip'); // note no subscripts required
>
> $myArray['0'] will contain 'first value', $myArray['1'] the second value,
> and so on


Doing as you have suggested, count($myArray) gives the correct number
of values ticked.

But only $myArray['0'] is set!
$myArray['1'], $myArray['2'] , ..., etc are not set!

Not to flame or anything, I AM quite surprised by how arcane processing
a checklist in php is turning out to be. :-)


Thanks again!
Girish

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация