Jump to content

users in members page


BillyBoB

Recommended Posts

im tring to make a page where the members are sorted by abc order then
beside there name it has a number and it goes in order 1 2 3 4 5 6 ... etc

heres what i have if u can make it echo a number before the username:

[code]
<?php
$getuser = mysql_query("SELECT * from users order by username");
while ($user = mysql_fetch_array($getuser))
{
echo (" <a href=\"members.php?user=$user[username]\">$user[username]</a><br />\n");
}
?>
[/code]

plz help thanks
Link to comment
Share on other sites

[code=php:0]
<?php
$getuser = mysql_query("SELECT * from users order by username");
$i = 1;
while ($user = mysql_fetch_array($getuser))
{
echo ("$i <a href=\"members.php?user=$user[username]\">$user[username]</a><br />\n");
$i++;
}
?>
[/code]
Link to comment
Share on other sites

Lol, dude, chill out.

Later today I'll post you my view_users.php script if you want it. It lets you sort by the different types of information (IE, order by username, first name, last name, etc.) pagnates results over pages so you don't have to show a long list of members on one page.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.