Mon, 25 Nov 2024
Total Visits
35387127
Visitors today:
474
Main Menu
Home
Free Scripts
Forum
Guestbook
Repository
Contact
Our Sponsors
Chi Kien Uong
Geranienstraße 30
71034 Böblingen
Deutschland / Germany
If you are not registered or logged in, you may still use these forums but with limited features.
Show recent topics
Search
Hottest Topics
Member Listing
FAQ
Register
/
Login
General help...
Forum Index
»
Support Forum
Author
Message
10/08/2003 23:21:28
Subject:
General help...
Anonymous
I wanted to modify the today hit counter like the one of the top: Got this code:
<?php include ("./config.inc.php"); if ($COUNT_CFG['use_db']) { include ("./mysql.class.php"); } include ("./counter.class.php"); $counter = new dcounter(); $visits = $counter->show_counter(); /* Returns an associative array */ echo $visits['total']; echo $visits['visits_today']; ?>
I wanted to add <b>Total Hits:</b> # here and <b>Today Hits:</b> # here and but a <br> inbetween them so they go on seperate lines.
So I did this, but I get an error:
<?php include ("./config.inc.php"); if ($COUNT_CFG['use_db']) { include ("./mysql.class.php"); } include ("./counter.class.php"); $counter = new dcounter(); $visits = $counter->show_counter(); /* Returns an associative array */ echo <b>Total Hits:</b> $visits['total']; echo <br>; echo <b>Today Hits:</b> $visits['visits_today']; ?>
What am I missing/wrong?
10/08/2003 23:47:11
Subject:
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
Change it to this ::
<?php include ("./config.inc.php"); if ($COUNT_CFG['use_db']) { include ("./mysql.class.php"); } include ("./counter.class.php"); $counter = new dcounter(); $visits = $counter->show_counter(); /* Returns an associative array */ echo "<b>Total Hits:</b> $visits['total']"; echo "<br>"; echo "<b>Today Hits:</b> $visits['visits_today']"; ?>
Auron
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
11/08/2003 00:50:22
Subject:
Anonymous
I get this error (I put it "it=code" in menu.php file):
Parse error: parse error, expecting `','' or `';'' in /home/groups/j/js/jspbbs/htdocs/bhimpfen/menu.php on line 51
11/08/2003 09:12:58
Subject:
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
Whats on line 51?
Try the code above again since I've modified it slightly.
Auron
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
11/08/2003 19:05:30
Subject:
Anonymous
line 51 = the first echo
Can the owner of this reply! because nothing is working
11/08/2003 20:39:25
Subject:
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
Try removing the ' 's from the beginning and end of total and visits_today
Auron
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
11/08/2003 22:49:51
Subject:
Anonymous
I got it to work I did this:
Head Area of menu.php:
<?php include ("./config.inc.php"); if ($COUNT_CFG['use_db']) { include ("./mysql.class.php"); } include ("./counter.class.php"); $counter = new dcounter(); $visits = $counter->show_counter(); /* Returns an associative array */ ?>
Then where I wanted the output put:
<?php echo date("D, j F Y"); ?> <br> Total Visits: <?php echo $visits['total']; ?> <br> Visitors Today: <?php echo $visits['visits_today']; ?>
12/08/2003 13:04:33
Subject:
Auron
Expert
Joined: 23/06/2003 22:02:17
Messages: 1053
Offline
This would also work I think, if you want to tidy it up.
<?php echo date("D, j F Y"); echo "<br>Total Visits: $visits[total]"; echo "<br>Visitors Today: $visits[visits_today]"; ?>
Auron
Visit my site @ www.ragnaru.com
Adv. Poll Install Guide NOW BACK ONLINE! (And also rather out of date I would of thought)
Forum Index
»
Support Forum
Go to:
Select a forum
General Discussion
Support Forum
German Forum
Advanced Guestbook Forum
Advanced Guestbook Modifications
Based on the open source
JForum