Oh! that should work!
There may be an easier way to go about this...but basically what I am doing:
I have an expense sheet for my work (so like when people go away for meetings, how much of it is covered (ie. 22$ for breakfast, 24 for lunch, 29 for dinner...etc, then there are other expenses [gas, hotels, and more 😛])
So right now i have a form with 14 checkboxes. What I need is that when a button is clicked, it scans thru all the boxes to check if they are checked (i was just going to do if(isset($_POST['breakfast'] ..or what ever name they have.. for all of them)
So if a box is checked, it will add how ever much to the grand total (for the meal ones, it is a set value, but things like gas, the person will enter a value in a text box, and that will be added). also, they will be added to a long string to go into my sql database that holds the values of which boxes are checked.
Maybe there is a better way of doing this too..?
I was just going to go ...under the description field of my database, like: "breakfast, dinner, ferry" and just have something like that for every single entry...but that seems kinda inefficient...would it maybe be better to have 14 fields for each one in my database with a boolean value? because in the way I have it right now, I cant think of how I will be able to "report" the values...like on the display screen...?
Is it possible to avoid using the 'check check boxes' button that I have...? it would be great if it was just like "if box is checked, add $xx.xx, if it is unchecked remove $xx.xx...?" I know there is like onFocus/onclick...but those never seem to work for me...and can you only use them if you use javascript?
Thanks...sorry that this post is sort of all over the place 😛 if you need any clarification, let me know