|
Posted by Girish on 10/06/12 11:59
Jerry Stuckle wrote:
>
> Girish,
>
> First of all, it should be $myArray[0], not $myArray['0']. It has a
> numeric index. And the fact count($myArray) has the correct value
> indicates the values are correct.
>
Hi Jerry, I had tried both $myArray[0], not $myArray['0'], behaviour
was the same in both cases.
"
> Also, the way you have it coded, if the 'second value' checkbox is not
> checked, myValue[1] will not be set and you'll get a notice if you try
> to use it. Unless you absolutely have to have the indexes like that, a
> better way is to use:
>
> <input name='inp[]' type='checkbox' value='first value'>
> <input name='inp[]' type='checkbox' value='second value'>
> <input name='inp[]' type='checkbox' value='third value'>
>
> Now inp[0] will contain the value from the first checked box, imp[1]
> will contain the value from the second checked box, etc.
>
Ah. gracias. This probably would have worked. The reason I was using
POST was just that GET is easier to debug AND to save as a link to the
report page.
thanks everyone!
Girish
Navigation:
[Reply to this message]
|