Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.