Answer the question
In order to leave comments, you need to log in
How to make such functionality for a button on the site?
Hello everyone
There was such a problem, now I'm making a website, and I need to make a regular button for the site
There are no problems with layout, the problem is different
The functionality of this button implies the following:
The button can be pressed for example 5 times, after a certain time, let's say there is a timer after which the button will be clickable
So here's how to make the button work until any five users click on it, that is, take into account all the people who visit the site, and not one user who can click 5 times on this button
I just don't even know which way think to find a solution
I would be very grateful for the help
Answer the question
In order to leave comments, you need to log in
We create a table for tokens in the database.
When requesting a page, we check the number of tokens in tbl.
If less than 5, display the button clickable.
We assign a token to the user (if necessary).
Tracking button clicks.
We send the token of the clicked user to the server.
We write the token in tbl, if there is none.
etc.
Lots and lots of options...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question