Hi ,
I need help with click bug. Thanks..
click bug
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
click bug
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
Thanks...
Your help is appreciated
use this:
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.
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.";
}
?>you could un set it on another page incase the user wants to edit the data again.
Code: Select all
<?php
unset($_SESSION[done]
?>