LeeS Posted August 10, 2011 Share Posted August 10, 2011 I hope someone can help?? I need to set up a competition entry page to allow 100 people per day to enter. After the 100th entry, I need to the form to not be visible, and a message to say "please try again tomorrow" Can anybody help? Quote Link to comment https://forums.phpfreaks.com/topic/244400-setup-competition-form-to-allow-100-entries-per-day/ Share on other sites More sharing options...
trq Posted August 10, 2011 Share Posted August 10, 2011 Assuming your storing the entries within a database - ensure you store a date. Then simply check to see if there aren't already 100 entires added for the before allowing a new one to be added. Quote Link to comment https://forums.phpfreaks.com/topic/244400-setup-competition-form-to-allow-100-entries-per-day/#findComment-1255232 Share on other sites More sharing options...
LeeS Posted August 10, 2011 Author Share Posted August 10, 2011 at the moment, The form runs a php script on submit. The Script does two things. It send the contact info via email, plus it also adds the details to an email marketing system via their API. I thought I might have to also add this to a DB to count the records, but have not got a clue how then to query the DB to get the desired result. Quote Link to comment https://forums.phpfreaks.com/topic/244400-setup-competition-form-to-allow-100-entries-per-day/#findComment-1255265 Share on other sites More sharing options...
trq Posted August 10, 2011 Share Posted August 10, 2011 There are plenty of tutorials around that cover querying a database. Take a read of when and come back when you have a specific issue. Quote Link to comment https://forums.phpfreaks.com/topic/244400-setup-competition-form-to-allow-100-entries-per-day/#findComment-1255266 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.