Hi there
I'm not really to clever with this, havnt really used it alot.
Can someone perhaps help me out here? I don't think what i done here is right, example, i want to delete users from online list on my new script if theyr idle time is to long.
I included this in the required pages...
<?php
$tyd = 120;
$dabar = time();
$timeout = $tyd1 - $tyd;
$name = $_GET['name'];
mysql_query("DELETE FROM online WHERE name<$timeout");
mysql_query("UPDATE online SET time='120' WHERE site='".$site."' AND name='".$name."'");
?>
Online SQL
CREATE TABLE `online` (
`id` int(4) NOT NULL auto_increment,
`site` varchar(15) NOT NULL default '',
`name` varchar(15) NOT NULL default '',
`time` int(15) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
On my login page.
mysql_query("INSERT INTO online WHERE site='".$site."'" AND name='".$name."' AND time='120');
Please help here, , , i think i'm going totaly wrong