|
Web design and Programming Discuss website creation and other programming topics. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
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. |
#2
|
||
|
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 |
#3
|
||
|
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? |
#4
|
||
|
yes, with probably some formating code to get it to display where you want it to. which forums do you use?
IcI |
#5
|
||
|
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 |
#6
|
||
|
Or just include global.php and grab the user count, same as on the forum But counting rows would be alot less work
|
#7
|
||
|
if your having trouble i'll help set that up for free contact me @ mcdonaldcoding@hotmail.com
|
#8
|
||
|
Awesome, I shall e-mail you from my home account in the morning. I'm php-retarded.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |