PDA

View Full Version : PHP script to display vB members by user group on a remote html page?


Jake Bunce
Sun 21st Jan '01, 5:48pm
I'm just starting to learn PHP. But I'm not that good with it yet. How would I do this? A complete code segment would be nice, or if any of you could point me in the right direction that would also be much appreciated. :)

Freddie Bingham
Sun 21st Jan '01, 6:07pm
include("./global.php"); // use full path to global.php here or init your own Database pointer and don't use global.php
$id = 2; // Registered Users
$users=$DB_site->query("SELECT * FROM user WHERE usergroupid=$id");
while ($user=$DB_site->fetch_array($users)) {
echo "Username = $user[username]<br>";
}

That is the basic code ..

Jake Bunce
Sun 21st Jan '01, 10:42pm
Thanks dude!