Hi,
Im trying to create multiple checkboxes dynamically.
I need to fetch the value if the check box selected in the next page.
Is there any solution.
Problems with dynamically created checkbox
Moderator: General Moderators
Re: Problems with dynamically created checkbox
If I understand your question, I think you should insert value by cliking checkbox button and select in a new page.tolearn wrote:Hi,
Im trying to create multiple checkboxes dynamically.
I need to fetch the value if the check box selected in the next page.
Is there any solution.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
The checkbox status will be available on the next page via it's name. If you've created a checkbox group (where there are two or more checkboxes with the same name) then it is easier to name with similar to "foo[]". The important part being the brackets. This will cause PHP to build an array of the values given to it by the browser. Sometimes being a bit more specific is preferential so a name of "foo[id]" where "id" is the unique part for each checkbox will set which element name each checkbox is given inside the resulting array.
I personally use the value attribute most often to signify which checkboxes were actually selected.
I personally use the value attribute most often to signify which checkboxes were actually selected.