Deactivate the Submit button for a certain time

Asked

Viewed 28 times

0

Is it possible to do 1 Ubmit per day by date time of the bank? Ex; the iduser do one post per day?

grateful!

  • If you are going to implement do it in the back end. If you do it in the front end, due to the nature of javascript, the user can reverse the lock.

  • @Wiliams! Everything in IT is possible! You must ask your question in order to have answers on how to implement this solution. And by the way, whenever possible do server-level validations / backend.

  • yes it is totally possible, but the answer would be too wide, first start searching how to record the date per user in the database and how to read, this will give a good code in php, then leave for the part to do the javascript part, that would receive this date or a "true/false" to disable the button

1 answer

0


To achieve this goal, you can use this solution:

First you must:

  • Create table userSubmitControl with the following fields: idUser and submitStatus;
  • Script (s2) to check whether the user has already done post or not. This is technically checking whether the field submitStatus is equal to phony (false) or truth (true).
  • Create a script to change the field submitStatus to fake, if this is true, and this script should run every day at midnight according to datetime of the bank.

According to:

  • When the user does Ubmit you should first check through the s2 script whether or not you can, if yes, proceed with Ubmit and then update the field for truth; and if not, interrupt Ubmit and all.

NB: You can use table information userSubmitControl to control the button.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.