Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is the javascript on the customer edit page that is supposed to call the php script:
- <script language="javascript">
- function delayer(){
- window.location = './checktime.php?ID=<?PHP echo $ID;?>',
- }
- </script>
- This is the interval tag setup in that same page:
- <body id="main_body" onLoad="setInterval (delayer(), 5 )">
- This is the page that updates the timestamp in the SQL record:
- <?PHP
- require_once('db.inc.php');
- $timestamp=date("Y-m-d H:i:s", time());
- $ID = $_GET['ID'];
- // $ID = '1041';
- $query = "UPDATE customer set uptime = '$timestamp' where ID = '$ID'";
- // echo $query;
- mysql_query($query);
- ?>
Add Comment
Please, Sign In to add comment