Saturday, January 17 2004 @ 02:06 PM EST
Contributed by: anonymous
Views: 1,186
This fairly useless code snippet, when placed in a PHP active static page, should produce a members listing. It needs your loving care, as it will display all the currently registered users on a single page. I couldn't figure out how to get it to display in chunks, but as we at Darja.net have less that a hundread users, it was easier to write this than a full blown plugin. Please let me know by posting here if you can imporve it.
--Maximus Co-Admin Darja.net
$color = "#C0C0C0"; // this set the background color of the switched row.
//get and prep array of user info
$membersprep = DB_query( "SELECT * FROM gl_users WHERE uid > 2 ORDER BY username" );
//$members = DB_fetchArray($membersprep);
//figure out haw many users we really have here
$limit = DB_count('gl_users') - 2;
$count = 1;
// tell folks how popular we really are
$putout .= "There are currently " . $limit . " members of the site!\n";
//Load up the first of the display
$putout .= "<table>";
When I enter the code into the static pages window, all references to the backward slash "\" are being scrubbed out when I save the page.
Has anyone had this problem? I'm sure I'm not the only one and I hope it is just a setting problem.
WinXP, Apache, PHP, MySql