PHP interesse |
|
Iedereen bedankt voor de hulp... ik heb et iets anders gedaan, maar wel mede dankzij jullie
Aanschouw:
<?
mysql_connect ("$dbhost", "$dbuser", "$dbpass");
mysql_select_db("databdrn");
$result = mysql_query("SELECT * FROM `isd_users` WHERE status = '<font color=\"#00C000\">Online</font>'") or die (mysql_error());
while($rij = mysql_fetch_object($result)){
$user = "$rij->user";
$verval = "$rij->verval";
$vervallen = "1" . date("dhis") - "1800";
if($verval <= $vervallen){ mysql_query("UPDATE `isd_users` SET `status` = '<font color=\"#FC1604\">Offline</font>' WHERE `user` = '$user'") or die (mysql_error()); } else { }
}
?>
<? $result = mysql_query("SELECT * FROM `isd_users` WHERE status = '<font color=\"#00C000\">Online</font>'") or die (mysql_error()); $user = "$rij->user"; $verval = "$rij->verval"; $vervallen = "1" . date("dhis") - "1800"; if($verval <= $vervallen){ mysql_query("UPDATE `isd_users` SET `status` = '<font color=\"#FC1604\">Offline</font>' WHERE `user` = '$user'") or die (mysql_error()); } else { } } ?>
|