RE: Preventing double-clicks APPEARS TO WORK FINE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
I am going to do some thinking (typing) out loud here because I need to
come up with a solution to double-clicking on a form button issue.
[/snip]

Because the data is contained in session variables this became an easy
issue once I logiced it out

/*
 * we have to find out if a double click occurred but we are going to
allow for a much longer time interval
 * of 30 minutes in order to make sure that the ESN can be provisioned
again, just not today.
 */
 
 $getESNDate =  "SELECT `ezESN` FROM `test`.`provision` ";
 $getESNDate .= "WHERE `updated` BETWEEN DATE_SUB(NOW(), INTERVAL 1800
SECOND) AND DATE_SUB(NOW(), INTERVAL 1 SECOND) ";
 $getESNDate .= "AND `ezESN` = '".$_POST['psESN']."' ";
 if(!($dbESNDate = mysql_query($getESNDate, $udc))){
 	echo mysql_error();
 	exit();
 }
 
 
 /* does it test positive for ESN within the past few minutes? */
 if(0 != mysql_num_rows($dbESNDate)){
 	/* the session data is already set, so go to activation receipt
*/
 	header("Location: ezActivationReceipt.php");
	exit();
 } else {
 	/* process normally */
      /* lines and lines of code */
 }

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux