Answer the question
In order to leave comments, you need to log in
How to limit the number of clicks on input to 1 time per day?
Guys, the next question. How to make the user (authorized) click on the input in the personal account and the next time he could do it only in a day?
Answer the question
In order to leave comments, you need to log in
On the client
Write to cookie , localStorage . After validation, set the disabled attribute .
Unreliable - the user can log in from another browser, from another device.
Store on the server the time of the last click for the user. When generating a page, set the disabled attribute if necessary .
Reliable - everything is determined unambiguously for an authorized user, regardless of device or browser.
Right. I thought to add a table to the users database that would record the date of the click. Further report. But in which section of the documentation to look to find out how to make changes to the table when you click on the button.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question