MySQL Forums
Forum List  »  PHP

Clicking on a button for limited times
Posted by: manal nor
Date: July 26, 2009 06:43PM

Hello dear friends ,

Consider we have a button where you should click

Is there anyone can help me and give the best idea how to make it limited

i means after 20 clicking on that button , it goes de-active / or / image / or / text for example says ( no more clicking )

Yes it could be very complex idea cause it may needs to recall a command at cronjob ( if i'm not wrong )

So the full story :-

i want a button that valid to be clicked 20 times per 24 hours , after the clicking 20 times , it gives msg says for example " come back 2morrow "

thanks in advance and i know it maybe hard and may takes time
but i really with that help , will open a new area into my mind

okay here is an simple example of

database.sql ( ip / time )
config.php ( connection to database )
index.php ( main functions )


but it didn't works cause i've still some error and really not able to understand where to put thay query

$time = time();  
mysql_query("INSERT INTO `ip_table` (`ip`,`timestamp`) VALUES ('".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."',$time)");

so can you please check out the example and fix it

Options: ReplyQuote

Written By
Clicking on a button for limited times
July 26, 2009 06:43PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.