webdevdea Posted August 1, 2013 Share Posted August 1, 2013 Ok I am needing advice, I have to make a student registration form. I am to have classes for the student to choose, only 30 students per class, so I need a way to count how many times a particular checkbox has been checked ever in the life of the form and it has to be flat file no SQL.. So I saw something about php TICK but I dont know if that would be it or not.. Please and thank you Quote Link to comment Share on other sites More sharing options...
lemmin Posted August 1, 2013 Share Posted August 1, 2013 Where are you storing the student registration information? Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted August 1, 2013 Share Posted August 1, 2013 PHP ticks have nothing to do with checkboxes, or forms in general. Beyond that, you're looking at the problem the wrong way. It doesn't matter how many times a box is checked, but rather how many students are signed up for that class. So, when you submit your form, you essentially need to do the following: // pseudo code If ($numStudents < 31) { $numStudents += 1; } else { // error, cannot add to the class }Why are you limited to a flat file for this? A database makes more sense, especially if you have records of existing students. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.