saving to database after few seconds questions
Posted: Thu Oct 23, 2008 8:20 am
dear all, im newbie here :p
I have this code, after user make a selection, he/she see the data that he/she selected,
then, that data name will be automatically save into their record database. is it possible
to make that, the record will be saved after user see for few seconds (ex: 5 seconds).
so that it wont save immediately ( for consideration that, if user see the data for more than 5 seconds, that
means he/she is interested, then it should be saved automatically)
here is the code:
can someone please help me with this? 
I have this code, after user make a selection, he/she see the data that he/she selected,
then, that data name will be automatically save into their record database. is it possible
to make that, the record will be saved after user see for few seconds (ex: 5 seconds).
so that it wont save immediately ( for consideration that, if user see the data for more than 5 seconds, that
means he/she is interested, then it should be saved automatically)
here is the code:
Code: Select all
if ($registration>0){
$qry="SELECT * FROM registration WHERE id_registration=".$registration" LIMIT 1";
$exe=mysql_query($qry);
$show=mysql_fetch_array($exe);
if (mysql_num_rows($exe)==1){
echo "<div class='divide'> ++ ".$show['title_registration']." ++</div><br />";
$query="INSERT INTO record_table VALUES('',".$_SESSION['ID'].",
'http://".$_SERVER[HTTP_HOST]."".$_SERVER[REQUEST_URI]."',
'".date("Y-n-j H:i:s")."')";