jviney Posted July 7, 2008 Share Posted July 7, 2008 I have a site where the user uses checkboxes to select options. They are stored in a MySQL database as enum "Y/N" answers, the default is "N". What I am trying to display in the output is... If they checked the checkmark, display the row name. An example I have is multiple checkmarks to select, "alcohol" and "food" and "dancing". If the venue has alcohol served, the checkmark for alcohol is selected and so on. In my output I want the table to say "alcohol" if it was checked. I'm trying to display the results in a table as there are other fields of text along with the checkmarks. Any help would be appreciated! Link to comment https://forums.phpfreaks.com/topic/113498-problems-with-checkboxes-and-displaying-results/ Share on other sites More sharing options...
gigas10 Posted July 7, 2008 Share Posted July 7, 2008 Just set up columns for each checkbox, like alcohol, food, w/e. And store them as 1's and 0's, 0 for no 1 for yes. Will be faster. Link to comment https://forums.phpfreaks.com/topic/113498-problems-with-checkboxes-and-displaying-results/#findComment-583186 Share on other sites More sharing options...
jviney Posted July 7, 2008 Author Share Posted July 7, 2008 ok, but how do I call them up in a table? Link to comment https://forums.phpfreaks.com/topic/113498-problems-with-checkboxes-and-displaying-results/#findComment-583200 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.