Answer the question
In order to leave comments, you need to log in
How can I make the form not close after clicking?
Hello. I did the authorization, everything is fine, now you need to do a password recovery. By clicking on the button "Forgot your password?" pops up this modal window.
I did so, after the user has entered the data, another field appears in the form, such as enter your new password. But this modal window after submit reloads the page. How to make it not reload the page? By ajax?
PS... after entering the data and clicking on submit, the page reloads, and when you click on the button again, another field appears
Answer the question
In order to leave comments, you need to log in
You need to use any database. The principle is this:
When any user accesses the bot, his ID is recorded in the database, as soon as he receives the necessary information, it is written to the table, for example, time.time()
and every time the user accesses the bot, something like this check occurs:
if (time.time() - last_update) >= 86400:
print('Ты снова можешь получить подарок:)')
else:
print('Ты уже получал подарок')
Whatever you want, of course, can be done. You need to do this by sending an ajax request.
But here it is:
bad decision.
Send the user a unique one-time link where he can set a new password.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question