Showing New Members Help

Hey everyone I am new here obviously and I have been working on this php based site for a long time and I am wondering what I am doing wrong to show my new members that my members added and I added to the DB. Now I have tested it and it works perfect when I have it on a regular page but once I put it in my marquee spot on the site it only shows 1 newest member and not 5 like I wanted! :frowning: I am so confused and I am hoping someone here can help me.

[code]$query = “SELECT * FROM {$dbprefix}members WHERE disable = ‘0’ ORDER BY rank DESC”;
$result = mysql_query($query)
or die(mysql_error());
while($row = mysql_fetch_array($result))
{
extract($row);

$namecolor = getRankCatInfo(“color”, $rank);

$filterUsername = textFilter($username);

$newmembers = "$filterUsername
";
}


<?php echo $newmembers; ?> [/code]

That is the code without the $i=1 and $i<5 or something because it was not working but I am hoping someone here can help me. Thanks for reading. :’(

I also forgot to mention my site were the code is setup.

http://www.taow.30dns.net/

I do not care about the marquee but it would help in showing my new members.

I cant find the edit button but here is the new script with me trying to make the db loop to show newest members I added… Probably the worse one yet…

$newmembers = "";

$i=0;
$query = "SELECT * FROM {$dbprefix}members WHERE disable = '0' ORDER BY id DESC";
$result = mysql_query($query)
     or die(mysql_error());
while($row = mysql_fetch_array($result) AND $i<5)
{
extract($row);
$i++;
foreach($row AS $key => $value) { ${$key} = addslashes(textFilter($value)); }
$dispRank = textFilter(getRankInfo("name", $rank));

$newmembers = "<center><a href='index.php?p=Profile&user=$username' class='memberspage' style='color: $namecolor'>$filterUsername</a></center>

";
}

Please I need help ASAP! :’(

I have new updates! I got it kind of working… I have it to show the newest member but I want to be able to show the 5 newest members! Can anyone help! Here is the new code please help me! :’(

$newmembers ="";
$query = "SELECT * FROM {$dbprefix}members WHERE disable = '0' ORDER BY id ASC";
$result = mysql_query($query)
     or die(mysql_error());
while($row = mysql_fetch_array($result))
{
extract($row);

$namecolor = getRankCatInfo("color", $rank);

$filterUsername = textFilter($username);

$newmembers = "<center><a href='index.php?p=Profile&user=$username' class='memberspage' style='color: $namecolor'>$filterUsername</a></center>

";
}

Then I have it further in the page where the layout is and it shows this!

<tr>
<td class='titles' align='center'><img src='themes/extendedgray/images/newestmember.jpg'></td>
</tr>
<tr>
<td class='main'><br>
<marquee scrollamount="1" direction="down" loop="true"
height="40px" onmouseover="this.stop();" onmouseout="this.start();">

<?php echo $newmembers; ?>

</marquee>
</td>
</tr>
Sponsor our Newsletter | Privacy Policy | Terms of Service