0
Hello guys I have a site and want the following ( I can not do, nor found on the net ), A button that after the click is registered in db, after that the button can only be clicked after 24 hours, the check-in table is like this:
-- Check-in Table
CREATE TABLE IF NOT EXISTS `checkin` (
-- AUTO INCREMENT... ID DO CLICK
`id_click` int(10) unsigned NOT NULL AUTO_INCREMENT,
-- Username do usuario isso você não precisa add um formulario pra pegar o nome < ja tenho >
`nome` varchar(64) NOT NULL ,
`hora` int(64) NOT NULL,
-- Não sei se isso é o suficiente
PRIMARY KEY (`id_click`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=529 ;
EX: I click the insert button on db, and after 24 hours the button releases again and so on
(NAME CAN PUT TO INSERT ANYONE EX: Alfonso, DPS I CREATE A FORM)
Your question is misspelled. After the button is clicked and inserts in db, the button is unavailable for 24 hours for all users?
– user60252
Not just for the user who clicked the button
– Alaskah
In this case it has to be a login page (to characterize that it is unique) with one more condition in the Where clause, that is, where the difference between the last recorded date and the current date is greater than 24 hours. If these conditions are met release the button to be clickable.
– user60252
If any answer has solved your problem mark it as accepted. See how in https://i.stack.Imgur.com/evLUR.png and see why in https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079
– user60252
This game is very complicated for me, rsrsrs, but anyway you have to login to enter, that’s where you will recognize and deactivate the button
– user60252
I couldn’t see that button, maybe they use cookies created when you log in
– user60252
I already have the login system, password , registration, session cookie my dB weighs some 5MB only need this damn button that only the owner in Yuup has (I know him more he does not pass anything) he says it’s easy to do except that on his site he switched the button for an insert when he enters the client.php to be easier pros users more before said it was a button that was in the /me.php
– Alaskah
A guy in the business also did more he lost his mega is no time to do because he has other projects...
– Alaskah
has how to give Insert in all users of db without entering the site type without me entering the site it add auto
– Alaskah