Hello, I hope that someone will be able to help me or at least point me in the right direction.
I have a table, with values for each row being retrieved from a database.
I want to add a checkbox for each row which if selected will allow me to perform some further action (i.e. send an email to the person who's details are in the selected row).
How can I get the value of the ID field ($row[0]) for all rows that have been selected?
My original idea was to have a 'selected' field in the database and updating this for each row, every time a checkbox was changed - but this would not be a good solution as there would be conflicts if more that one user accessed the form at the same time.
Also I need the checkboxes that are selected to stay selected following a submit.
Thanks for any help you can offer
Regards
Ian
Checkbox - get row ID
Moderator: General Moderators
-
litebearer
- Forum Contributor
- Posts: 194
- Joined: Sat Mar 27, 2004 5:54 am
Re: Checkbox - get row ID
what code have you tried thus far?
Re: Checkbox - get row ID
It depends on how your HTML table was constructed and how you are submitting the data back to an action script, so without seeing your code, we can only guess or tell you generalities. So generally, when your initial code is creating the table with the dynamic data, it also includes the row number as part of the link back, or the HTML element tag, so that when it is submitted, the selected element will have the row number to return to the action script.