temporary disable button using php
Posted: Thu Dec 17, 2009 9:08 am
Ok, so i have researched some about disable a button and everyone says that u need to use js. now i dont know that much js so i wonderd if there is a way to do this in php only.
If not then please post a sample code that would temporary disable a button for "exampel 3 seconds".
This is ment to do:
example:
$rand = rand(0,10)
$brand = rand(0,10)
if ($brand == $rand)
{
$input = rand(7500,65000)
$sql="UPDATE konto SET pengar=$pengar + $input WHERE saved_id=$id";
$result = mysql_query($sql) or die(mysql_error());//Skicka info till tabell
header('Refresh: 3; url=refresh/two=two(main).php?saved_id='.$id);//Skickas till angiven sida. //and at the same time the button would be disabled
}
If not then please post a sample code that would temporary disable a button for "exampel 3 seconds".
This is ment to do:
example:
$rand = rand(0,10)
$brand = rand(0,10)
if ($brand == $rand)
{
$input = rand(7500,65000)
$sql="UPDATE konto SET pengar=$pengar + $input WHERE saved_id=$id";
$result = mysql_query($sql) or die(mysql_error());//Skicka info till tabell
header('Refresh: 3; url=refresh/two=two(main).php?saved_id='.$id);//Skickas till angiven sida. //and at the same time the button would be disabled
}