Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 946 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

Online/Hits

Thread title: Online/Hits
Closed Thread    
    Thread tools Search this thread Display Modes  
03-08-2008, 11:17 AM
#1
Lustre91 is offline Lustre91
Status: Member
Join date: Oct 2007
Location: UK
Expertise:
Software:
 
Posts: 491
iTrader: 0 / 0%
 

Lustre91 is on a distinguished road

Send a message via MSN to Lustre91

  Old  Online/Hits

Hey,

I would like to add two new options to my statistics list on my site, I can't show it you yet because it's not finished.

Online: 5
Hits: 13445

That's what I need to add, does anyone know how to do it? Help is appreciated

03-08-2008, 01:54 PM
#2
Alex Eyre is offline Alex Eyre
Alex Eyre's Avatar
Status: Designer
Join date: Aug 2006
Location: Manchester
Expertise:
Software:
 
Posts: 1,132
iTrader: 5 / 100%
 

Alex Eyre is on a distinguished road

Send a message via MSN to Alex Eyre

  Old

Hey Richard K,

You're going to have to provide us with some of the code already implemented on the site so that we can continue to use the stylesheet. But if you merely need to add the text you have displayed in a list then use the following:

HTML Code:
<ul>
 <li><b>Online:</b>5</li>
 <li><b>Hits:</b>13445</li>
</ul>
Unless you need to implement some form of PHP, which im guessing you do, then you replace the number with the variable from a mysql query (or other query) and echo it.

PHP Code:
<?php
// I am assuming you have already connected to the MySQL DB
// And set a query with the variable '$hits' and '$online'.
?>

<ul>
 <li><b>Online:</b><? echo $online "?></li>
 <li><b>Hits:</b><? echo $hits "?></li>
</ul>

Alex

03-08-2008, 02:15 PM
#3
Lustre91 is offline Lustre91
Status: Member
Join date: Oct 2007
Location: UK
Expertise:
Software:
 
Posts: 491
iTrader: 0 / 0%
 

Lustre91 is on a distinguished road

Send a message via MSN to Lustre91

  Old

I'm not really sure what to do with that. I'm a beginner so I kind of need to be told what goes where and what I need to edit, if that's ok

03-08-2008, 02:40 PM
#4
Zara is offline Zara
Status: Member
Join date: Apr 2006
Location:
Expertise:
Software:
 
Posts: 249
iTrader: 9 / 100%
 

Zara is on a distinguished road

  Old

Originally Posted by Richard K View Post
I'm not really sure what to do with that. I'm a beginner so I kind of need to be told what goes where and what I need to edit, if that's ok
Sorry, that will not happen with the amount of information you've given us.. You posted in the javascript section, yet this feature would need PHP or another server side scripting language to get the data from the database and then output HTML to your page.

Since you say your a beginner, you're going to have to post quite a bit of code for us to view or pay someone to do it for you.

03-08-2008, 03:05 PM
#5
Compumaniac12 is offline Compumaniac12
Status: Junior Member
Join date: Mar 2008
Location:
Expertise:
Software:
 
Posts: 25
iTrader: 0 / 0%
 

Compumaniac12 is on a distinguished road

  Old

isn't there a way to do that with javascript and XML? the hits at least, i think.
never done it tho.

I would agree with these guys, your going to need to show us your page, where you want it, and some of the code around it. Also if you have a php on your webhost we would need that information.

After that someone may offer some code for you.

03-08-2008, 03:07 PM
#6
Lustre91 is offline Lustre91
Status: Member
Join date: Oct 2007
Location: UK
Expertise:
Software:
 
Posts: 491
iTrader: 0 / 0%
 

Lustre91 is on a distinguished road

Send a message via MSN to Lustre91

  Old

I've done it now, thanks for the help.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed