raver@box.dust.za.net wrote:
Hi!
Got some questions that I hope you people can help me out with.
1)
I want to manage a messagebord, mainly to remove unwanted/old messages. The messages are stored in a MySQL db. I have a sql method that select wanted data. I use the method in a form in a #in tag to displays the selected data, within the #in tag I added a <INPUT TYPE="checkbox" NAME="checked" VALUE=1>. I also have a hidden field submitting the id fields reffering to each selected record within the above mentioned #in tag.
All looks just fine - the data is listed and checkboxes appear as they should. But trouble is - submitting the forms data will give me a list of 1's (only the checked out is submitted), and a list of _all_ selected row ids. I need just the ids corresponding to the checked out records. If it's at all possible - please tell me how to.
I usually solve similar problems by encoding the id in checkbox name, something like this <input type=checkbox name="id<!--#var dbid-->"--> and then use some manual labour to extract the fields from REQUEST.form.keys() --------------------- Hannu