I am trying to get a page to display a total number of members on my forum so have done the following:
created a page containing:
All this does it display "Total members:" with no value afterwards, what am I doing wrong here?Code:<?php $db_host = 'localhost'; $db_user = 'xx'; $db_password = 'xx'; $db_name = 'adejones_phpb1'; mysql_connect($db_host,$db_user,$db_password) or die(mysql_error()); mysql_select_db($db_name) or die(mysql_error()); $result = mysql_query("SELECT num_users as count FROM phpbb_config"); echo 'Total members: '.$result['count'].'<br>'; ?>
Thanks, Adey


Reply With Quote
Bookmarks