Total Hits: <?php include ("$directorypath/includes/counter.php"); ?><br />
Total Hits: <?php$h=mysql_query("SELECT `hits` FROM `dd_settings`");while($row = mysql_fetch_array($h)){ echo "$row[hits]"; } ?><br />
<?phpmysql_query("UPDATE dd_settings SET hits=hits+1");?>
CREATE TABLE `guests_online` (`session` char(100) NOT NULL default '',`time` int(11) NOT NULL default '0') TYPE=MyISAM;
$totalcomments = $db->num_rows($db->query(sprintf('SELECT ID FROM dd_comments')));
$year = date('Y');$session=session_id();$time=time();$time_check=$time-600; //SET TIME 10 MINS$count=mysql_num_rows(mysql_query("SELECT * FROM `guests_online` WHERE session='$session'"));if($count=="0"){$sql1="INSERT INTO `guests_online`(session, time)VALUES('$session', '$time')";$result1=mysql_query($sql1);}else {"$sql2=UPDATE `guests_online` SET time='$time' WHERE session = '$session'";$result2=mysql_query($sql2);}$count_user_online=mysql_num_rows(mysql_query("SELECT * FROM `guests_online`"));
Users Online: <? echo countusersonline(); ?><p>>
Guests online: <?php echo $count_user_online; ?><p>
<?php$sql4="DELETE FROM `guests_online` WHERE time<$time_check";$result4=mysql_query($sql4);?>
Hey it worked .Thanks alot,now,I think, I got rid of all the errors.Should be easier from now on.
Is this ported from your 2.1 code Adam? Haven't done a side by side comparison, but it looks vaguely familiar. Thanks!