Retrieving data from dynamic forms

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sparky753
Forum Commoner
Posts: 51
Joined: Fri Nov 03, 2006 10:39 am

Retrieving data from dynamic forms

Post by sparky753 »

I have a PHP web form that pulls records from a database table. Based on the data in the table, the records are displayed with checkboxes that have a value that is equal to the record's ID.

To handle this form submission, how do i detect which checkboxes have been checked? If this was a static form, I could handle it based on the name of the field but since the checkbox values are not static, how do i check for all the checked boxes on submission?

Thanks....
sparky753
Forum Commoner
Posts: 51
Joined: Fri Nov 03, 2006 10:39 am

Post by sparky753 »

This is what my checkbox looks like:

Code: Select all

<input type="checkbox" name="deleteimg[]" value="<?= $row[0] ?>">
Post Reply