Page 1 of 1
click bug
Posted: Sun Mar 30, 2003 1:17 pm
by k_nitin2k
Hi ,
I need help with click bug. Thanks..
Posted: Sun Mar 30, 2003 1:43 pm
by twigletmac
What's the bug? Can't help you if we have no idea what the problem is...
Mac
click bug
Posted: Sun Mar 30, 2003 2:41 pm
by k_nitin2k
Sorry , i thought it's a well known bug. what it is that i have a database that i am accessing through PHP scripts. My php scripts comtains HTML forms, users fill these forms and submit them. After making some check on the user inputs, it updates the database.So what users are doin is they put the value in the HTML forms and keep clicking on submit buttons very fastly. My data base assumes that these are all request and get changes accordingly. so my concern is that after clicking submit button once or hitting enter key once, my system should not allow any other input by clicking it many times fastly.
Thanks...
Your help is appreciated
Posted: Sun Mar 30, 2003 3:08 pm
by qads
use this:
Code: Select all
<?php
session_start();
if(!$_SESSION[done] == 1)
{
//data update code here...
$_SESSION[done] == 1;
}
else
{
echo"You already updated this information, if you must update this information again then please move to another page.";
}
?>
what this does is to check for $_SESSION[done], if it is set and = 1 then that means the user has updated the info.
you could un set it on another page incase the user wants to edit the data again.