yeah, i do it like this with checkboxes....
say you have a bunch of categories, or whatever, and they all have an ID in the database, you want to be able to check them and submit the form, and then have the php page do something with the ones you've checked. ...right?
suppose you have a bunch of radio stations. loop through the db to create the html form with the checkoxes, and set the html for each radio station's checkbox like this
<input type=checkbox name="station_nn>
where nn is the ID of the station from the db.
then when the form is submitted, loop through every element on the form and look for the "station" in each key. when you find it, do a string replace and remove the "station" from the key, and you end up with the ID from the db, which you can stick into an array or tack onto a sql query string, etc....
here is sample code i use to loop through the form: Change "delete_res_id" to whatever you want and set the second argument of substr() to the length of that string...
while (list($key, $val) = each($HTTP_POST_VARS)){
if(substr($key, 0, 14) == "delete_res_id_"){
$m_id = str_replace("delete_res_id_", "", $key);
if(is_numeric($m_id)){
// do something here with the ID
}
}
}
hope that helps.
Frizzo