How do i limit the user to submit the form once in 24 hour in php. No Logins required for submit the form. Is there any way to set the timer on a specific string ? Any help appreciate .?
Simple submit form for URL using POST method and for validation and checks i used simple "empty" & "preg_match" variables works fine.
I think that adding to the URL for the POST method may not be enough for the extra work that you add to the system.
I would hazard a guess that you are planning on capturing the IP address of the end user, however that same end user may get a different simply by disconnecting and reconnecting to the Internet.
Plus, some uses may visit the site in question with multiple devices during different times of the day.
What you could try is to capture the end user's email address (or something uniquely identifiable) and before allowing the values to be submitted to the database you check to see if that value was used in the last 24 hours.
Without capturing an email address (or something uniquely identifiable) and without forcing the user to login I think a cookie would be the next best option.
“The strongest of all warriors are these two — Time and Patience.” ― Leo Tolstoy, War and Peace
Evacuate the building! Here, take this tiny ad with you:
Two software engineers solve most of the world's problems in one K&R sized book