Firefox PHP

Diosplay number of registered users

Posted by Godai 
Diosplay number of registered users
March 15, 2004 07:50PM
Can someone help me with that?

I just need a line in footer like:

"We have xx registered uses so far"

I tried doing it myself but I'm to lame :)

Greetz,

Godai
Re: Diosplay number of registered users
March 16, 2004 08:30AM
Here is what you've asked for:

$sSQL="SELECT * FROM `forums_auth` ";
$result = new query($DB, $sSQL);
echo "We have".(mysql_num_rows($result))."registered uses so far"";
Re: Display number of registered users
March 16, 2004 12:20PM
Great thanks Aedus, but... I can't make it work...

The code in footer looks now like this:

<?php if ( !defined( "_COMMON_PHP" ) ) return; ?>
<br />
<div align="center">
<?php $sSQL="SELECT * FROM `forums_auth` ";
$result = new query($DB, $sSQL);
echo "We have ".(mysql_num_rows($result))." registered uses so far"; ?>
<a href="[phorum.org"]; target="_blank"><img src="images/button.gif" width="90" height="30" alt="phorum.org" border="0" /></a></div>
</body>
</html>

And it returns an error:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/ukjpl/domains/ukj.pl/public_html/gniazdo/include/footer.php on line 6
We have registered uses so far

When there was a double quote at the end, like in your post:

uses so far"";

it returned parse error...

I have really no idea how can I solve it, so, if you had a little time, could you please have a look and let me know?

Woudl be grateful.

Greetz,

Godai
Godai
Re: Display number of registered users
April 06, 2004 05:10PM
Damn.... Nobody did it before? Wasn't the number of registered users and interesting feature?

I tried, but I'm too weak in php to manage it. Can anyone try and help me?

Greetz,

Godai
Sorry, you do not have permission to post/reply in this forum.