Page 1 of 1

an easy question!!!

Posted: Mon Mar 03, 2003 5:12 am
by skull cowboy
Hi all,

I'm generating a page with php. In this page i'm including a form with a lot of checkbox, several of this checkbox are checked an others not. So, when i clicked on submit button, only take the value from the checked box previously. Anyone could tell me why don´t get the others values?
I only need determinate which of this checkbox are checked or not in the next php page.

thanks in advance.

sorry by my english.

Posted: Mon Mar 03, 2003 5:17 am
by volka
That's the way selected options are shipped via html/http, as name=On
If you want to get multiple option instances of the select-element use something like

Code: Select all

<select name="mySelect&#1111;]">
and you will get an array (with numerical indices) containing all checked options.

thanks

Posted: Mon Mar 03, 2003 5:22 am
by skull cowboy
I´ll try with this.

Thanks.

another solution?

Posted: Mon Mar 03, 2003 6:09 am
by skull cowboy
Ok, i tested your solution and it is ok, but it is possible to do the same thing with the checkbox control? Do you know another solution with chekbox control?

sorry, but i prefer use the checkbox control instead of select control for design reasons.

thanks again.

Posted: Mon Mar 03, 2003 6:29 am
by twigletmac
Please keep all questions related to one topic in the same thread. It gets messy if you open new threads relating to something you've already asked elsewhere.

Mac

Posted: Mon Mar 03, 2003 10:10 am
by volka
almost the same

Code: Select all

<input name="myCheckbox&#1111;]" value="1" /><br />
<input name="myCheckbox&#1111;]" value="2" /><br />
<input name="myCheckbox&#1111;]" value="3" /><br />
<input name="myCheckbox&#1111;]" value="4" /><br />
I tried to explain it here: viewtopic.php?t=4396