rgb192
asked on
if user is on page for more than 30 seconds, do something
i want to redirect to a page
and insert value into database
insert into table (column1) values ('timeout');
and insert value into database
insert into table (column1) values ('timeout');
ASKER
i have the form on one page. a form that posts to itself. Is there any way to do this on one page
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
window.onload=function(){
setTimeout( "location.href='insert.php
}
then in insert.php
<?php
if( isset($_GET['status']) && "exp"==strval($_GET['statu
{
mysql_connect("localhost",
mysql_select_db("dbname") or die(mysql_error() );
mysql_query( "insert into table (column1) values ('timeout') WHERE id=".inval($_GET['id']) ) or die( mysql_error() );
}
?>