View Single Post
Old 10-23-2008, 03:49 PM   #1 (permalink)
iory
The Wanderer
 
Join Date: Oct 2008
Posts: 5
Thanks: 4
iory is on a distinguished road
Default saving to database after few seconds

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:
Code:
<?php
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'>&nbsp;&nbsp;++ ".$show['title_registration']." ++</div><br />";
  
$qry="INSERT INTO tb_history VALUES('',".$_SESSION['ID'].",'".$show['name_word']."',
'".$_SERVER[HTTP_REFERER]."','".date("Y-n-j H:i:s")."')";
?>
can someone please help me with this? :(
iory is offline  
Reply With Quote