Jump to content

Archived

This topic is now archived and is closed to further replies.

BillyBoB

users in members page

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

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites
i tried that but it didn't work b4 lol
and i know why cuz
im not that smart awake with only
5-6 hours or sleep cuz i didnt put
$i++ lol stupid me lol

Share this post


Link to post
Share on other sites
5-6 hours.... lucky you.

Share this post


Link to post
Share on other sites
will u plz tell me how the karma works i dont get it im
usually pretty nice and isnt karma like how u think about other ppl
if so why do i have -2

Share this post


Link to post
Share on other sites
no wonder u have 2000 + post uve been here for almost 2 years lol i just started this mourning early

Share this post


Link to post
Share on other sites
[quote]will u plz tell me how the karma works[/quote]
Who cares?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

×

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.