I'm trying to do something and I'm sure there is a good technique for
it, but I just can't figure it out.
I have some member records in a database. I want to display a list of
them, and have a checkbox next to each member. One can then click in
the checkboxes for one or more members and the next page should then
take action on the selected members.
I know how to get the members from the database, I know how to create
the form to display each member with a checkbox next to their name.
What I can't figure out is a good method to name/identify the
checkboxes so that the values passed to the next URL can be
programatically processed in a loop.
I'll try and demonstrate:
List:
<form action="sendsms.php">
<table>
<!-- I'm outputting this in a while loop -->
<tr>
<td><input type=checkbox name=?? value=$mem_id></td>
<td>$member_name</td>
</tr>
<!-- end while loop -->
</table>
<input type="submit" value="Submit">
</form>
I assume that the $id (unique member id) would be a good value for the
checkbox to have, but I don't know what to name the checkbox so that
in the action URL I can loop through the values to process those
selected?
Thanks for any help.