Go Back   Novahq.net Forum > Computers > Web design and Programming

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-25-2006, 09:07 PM
BlackMass is offline BlackMass
Registered User

Join Date: Sep 2004
Posts: 290

php question

Ok, I have no clue if or how this would be done, because I'm less than a beginner when it comes to php and such. My [ community forums ] has a place at the bottom that tells how many registered members we have, as I'm sure all forums have.

On my [ website ] I have a place on the left section there where I have a php counter ( which I'm proud as hell that I got working ! ) and right below that I post the number of members in the community.

At the moment I just manually change that number. How - or even can I - get that members number from the forum posted on my website so that it will automatically update for me?

Any ideas? I know there are some smart php / code people here to help me out.
__________________


» Visit Clan Hall Gaming «
Reply With Quote
  #2  
Old 06-25-2006, 09:12 PM
IcIshoot is offline IcIshoot

Join Date: Mar 2004
Location: Farmington Hills, MI
Posts: 1,473

Send a message via AIM to IcIshoot Send a message via MSN to IcIshoot Send a message via Yahoo to IcIshoot
I only know of 2 ways: 1: you see if in the forum database there is a field that has the count, and just pull it from there, or 2: you count all the users in your forum users table and display that number.


You using phpnuke or some other cms system? if so, there may be a block that already exists for your forum that may do this automatically
Reply With Quote
  #3  
Old 06-25-2006, 09:26 PM
BlackMass is offline BlackMass
Registered User

Join Date: Sep 2004
Posts: 290

No, not phpNuke. Just a plain old website.

I know with my php counter I had to upload more than just the php script. I guessing I would have to do something like that in this situation? Or is it as simple as finding that code and pasting it into the webiste?
__________________


» Visit Clan Hall Gaming «
Reply With Quote
  #4  
Old 06-25-2006, 09:35 PM
IcIshoot is offline IcIshoot

Join Date: Mar 2004
Location: Farmington Hills, MI
Posts: 1,473

Send a message via AIM to IcIshoot Send a message via MSN to IcIshoot Send a message via Yahoo to IcIshoot
yes, with probably some formating code to get it to display where you want it to. which forums do you use?


IcI
Reply With Quote
  #5  
Old 06-25-2006, 11:08 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,919

Would be easy to tell you if I knew the table structure of ipb.. but I dont and it dosen't look like it's free anymore so i cant check

your query would look something like

<?
$connect=mysql_connect("localhost","mysql_username ","mysql_password");
$db=mysql_select_db("forum_database");

$query=mysql_query("SELECT user_id FROM users_table");
$total_users=mysql_num_rows($query);

Echo("We have a total of ".intval($total_users)." users in our community.");

mysql_free_result($query);
mysql_close($connect);
?>
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #6  
Old 06-26-2006, 02:12 AM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

Or just include global.php and grab the user count, same as on the forum But counting rows would be alot less work
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
  #7  
Old 06-26-2006, 03:03 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

if your having trouble i'll help set that up for free contact me @ mcdonaldcoding@hotmail.com
Reply With Quote
  #8  
Old 06-26-2006, 09:22 PM
BlackMass is offline BlackMass
Registered User

Join Date: Sep 2004
Posts: 290

Awesome, I shall e-mail you from my home account in the morning. I'm php-retarded.
__________________


» Visit Clan Hall Gaming «
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Question? Webviper2006 Web design and Programming 12 02-08-2006 04:37 PM
PHP N00by question DevilDog#1 Web design and Programming 6 12-30-2005 09:29 PM
PHP uploader question BOne Web design and Programming 11 03-18-2005 04:22 PM
PHP question Ice Cannon Web design and Programming 3 07-07-2003 12:14 AM
PHP question Kip Kilagan Web design and Programming 3 03-21-2003 02:39 AM


All times are GMT -5. The time now is 06:43 AM.




Powered by vBulletin®