guvenck
02-12-2006, 09:20 AM
Hi, I generate a form page from my MySQL database.
let's say the table structure is:
Table A
> ID, title, active
the number of rows generated by the query is dynamic. If a field's value is 1, then the form output appears as
<input type=checkbox name=$ID checked> $title
and if not
<input type=checkbox name=$ID> $title
At the bottom of the form there is a submit button. The visitor can check/uncheck rows and then submit the form.
I need to write a loop (possibly foreach) that takes the values and processes them and writes the changes to the database.
What should I do?
let's say the table structure is:
Table A
> ID, title, active
the number of rows generated by the query is dynamic. If a field's value is 1, then the form output appears as
<input type=checkbox name=$ID checked> $title
and if not
<input type=checkbox name=$ID> $title
At the bottom of the form there is a submit button. The visitor can check/uncheck rows and then submit the form.
I need to write a loop (possibly foreach) that takes the values and processes them and writes the changes to the database.
What should I do?