ok... here's the code....
<?php
session_start();
$timeoutseconds = 120;
$timestamp = time();
$timeout = $timestamp-$timeoutseconds;
$db = odbc_connect("main","","");
$sql = "INSERT INTO useronline VALUES ('$timestamp','$REMOTE_ADDR','$PHP_SELF', '$usr')";
odbc_exec($db,$sql);
$sql = "DELETE FROM useronline WHERE TIMESTAMP < $timeout";
odbc_exec($db,$sql);
?>
The insert works fine, so that means the table/fields names are right and everything. It's an access DB.