ironica Posted January 24, 2008 Share Posted January 24, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/87622-global-variablequota-system/ Share on other sites More sharing options...
PHP Monkeh Posted January 24, 2008 Share Posted January 24, 2008 Is using a database a viable option? I'm hoping it is if you're taking reservations Quote Link to comment https://forums.phpfreaks.com/topic/87622-global-variablequota-system/#findComment-448159 Share on other sites More sharing options...
ironica Posted January 24, 2008 Author Share Posted January 24, 2008 mmm, I never planned it that way. Boss just wanted emails with the details of each applicant listed sequentially. It's not too large a scope that it can't be manually managed like that Quote Link to comment https://forums.phpfreaks.com/topic/87622-global-variablequota-system/#findComment-448173 Share on other sites More sharing options...
PHP Monkeh Posted January 24, 2008 Share Posted January 24, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/87622-global-variablequota-system/#findComment-448183 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.