I am trying to display results from my database table in the form of checked checkboxes. I have a news table where my news story can be linked to one or many programmes.
In my add news page the user can tick as many programme boxes that are linked to the new news story. This is where i am using my checkboxes. Now i have the data going in to my news_programmes table perfectly. My problem is getting this information out and editing.
I would like to be able to show all the check boxes like in the new news page but if they are in the news_programmes table i would like the box to appear as checked. And if the user decided to uncheck an item i want it to be deleted from my news_programme table entirely.
What i normally do in this situation is simply list all the entries in the news_programmes table plus the original checkboxes. Then if the user wants to delete a programme I have a delete link next to the name of the programme. And if they wish to add, this is done like in the new news page. This works fine but I really like the idea of sticking to the checkboxes it looks more professional and neater.
Any ideas or pointers to relevant tutorials would be greatly appreciated.
Many thanks