I thinking the log file would look like this (would prefer it to be in Binary(not human readable) if possible):
/* My Checkbox Tallies checkbox.log */
reviews-chk-longer 597
reviews-chk-discrete 256
reviews-chk-natural 375
reviews-chk-thicker 539
reviews-chk-permanent 467
reviews-chk-stamina 390
reviews-chk-harder 310
reviews-chk-vascularity 279
reviews-chk-drive 136
reviews-chk-guarantee 536
reviews-chk-trials 410
reviews-chk-affordable 357
/* IP Logger How many times that IP checked each box then the actual IP */
0 0 1 1 0 1 1 0 0 1 1 0 192.168.1.1
0 0 70 5 3 4 3 2 0 1 2 0 17.15.45.12
.
.
.
.
.
/* End of File */
I am thinking that to make this simple just stop tallying any marks after 4(a user can check each box 2 times, a few duplicates is okay) and obviously the real file wouldn't have those comments.
so if someone checkmarks the box I assume a javascript needs to run (can php be used on a trigger?) that will ++ the variable or -- the variable if someone unchecked that box.
The other concern is the 2 checked boxes, I don't want it to subtract from the tallies if someone unchecks those boxes for the first time (I guess I can IF...THAN that deal based on how many times they clicked the checked boxes)
Finally it needs to read this file and sort the 12 variables based on most checkmars to least checkmars and display the sorted variables in a separate div. (Although I can do this part on my own)
The first part is a bit more difficult, particularly handling the onClick event to add those values to the file.
Please help me figure out how to do this. Thank you.