Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
saving to database after few seconds
Old 10-23-2008, 09:37 AM saving to database after few seconds
Junior Talker

Posts: 1
Name: iory
Trades: 0
dear all, im newbie here
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)
PHP 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 />";
  
 
$query="INSERT INTO record_table VALUES('',".$_SESSION['ID'].",
 'http://"
.$_SERVER[HTTP_HOST]."".$_SERVER[REQUEST_URI]."',
 '"
.date("Y-n-j H:i:s")."')";
?>
iory is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-23-2008, 12:09 PM Re: saving to database after few seconds
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Not with PHP.

it would have to be passed to the client then resubmitted/confirmed by a javascript timer operation.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to saving to database after few seconds
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23416 seconds with 12 queries