Problem with forms!
Posted: Sun Jul 06, 2008 8:40 pm
I am trying to code a php form that is dynamic. I don't know how many items there will be ahead of time. My plan is the script reads items from a database then displays them with two checkboxes. One for accepting the item, one for deleting it. Now I can get one checkbox to work but not the second one.
What I did was store all the ID numbers in a Session variable and named the Checkbox by the same ID number. In processing I called up each item in that Session variable and read the checkbox that way. The problem is the second checkbox can't be named the same ID number so I tried something like this:
<input type="checkbox" name=D$ID>
then reading it with
$_POST[d$id];
but that doesn't work, any ideas how I can tackle this?
What I did was store all the ID numbers in a Session variable and named the Checkbox by the same ID number. In processing I called up each item in that Session variable and read the checkbox that way. The problem is the second checkbox can't be named the same ID number so I tried something like this:
<input type="checkbox" name=D$ID>
then reading it with
$_POST[d$id];
but that doesn't work, any ideas how I can tackle this?