Jump to content

counting ticks


webdevdea

Recommended Posts

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 

Link to comment
https://forums.phpfreaks.com/topic/280729-counting-ticks/
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/280729-counting-ticks/#findComment-1443036
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.