Jump to content

Global Variable/Quota System


ironica

Recommended Posts

Is there a way of implementing something of a global variable, or a global counter for forms, so that I can set up a quota system for a reservations form and track each successful reservation?

 

i.e. if (counter* < 20)

              echo option for 5:30 to 6:00

 

where counter is the number of times anyone has submitted the form with that option? it works perfectly, except for , well, the counter part ;p

 

 

I tried using a file but that just ended sour.

Link to comment
Share on other sites

A database would make life so much simpler, especially if you're trying to eliminate multiple reservations of the same time etc.  The only way to do it (apart from files like you said) would be to edit the reservation form each time someone submits a reservation, so that the specific time/date is disabled or something.  But that sounds insane!  Consider a database, they're speedy and you can avoid duplicate bookings with ease.

Link to comment
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.