Hi,
Just wondering if someone could help me with this, i want to add 2 options.
Sort Username by ascending or descending in alphabetical order, So if its ascending it would show A’s First or descending it would should Z’s First.
Sort Points by ascending or descending in numerical order, So if its ascending it would show points with 0 First or descending it would should points XXXX First.
I would like the options to be a selection box, with no submit button, so it would be onChange=”document.formid.submit() in the select tag.
Heres my code so far,
[code=php]
<BR>
<font color=’FFFFFF’ size=’-1′ face=’Tahoma’><strong>List Users</strong></font><BR>
<font color=’FFFFFF’ size=’-2′ face=’Tahoma’><strong>All Current Users Registered</strong></font><BR>
<hr color=”#FFFFFF” align=”left” width=”80%”>
<table width=”50%” border=”0″>
<tr>
<td>
<?
$sql =”SELECT * FROM bb_users”;
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$points = $sql -> user_points;
$username = $sql -> username;
$email = $sql -> user_email;
?>
<table width=”100%” border=”0″>
<tr>
<td width=”50%” align=”right”><font color=’FFFFFF’ size=’-1′ face=’Tahoma’><strong>Username: </strong></font></td>
<td width=”50%” align=”left”><font color=’FFFFFF’ size=’-1′ face=’Tahoma’><strong><? echo $username; ?></strong></font></td>
</tr><tr>
<td width=”50%” align=”right”><font color=’FFFFFF’ size=’-1′ face=’Tahoma’><strong>Email Address: </strong></font></td>
<td width=”50%” align=”left”><font color=’FFFFFF’ size=’-1′ face=’Tahoma’><strong><? echo $email; ?></strong></font></td>
</tr><tr>
<td width=”50%” align=”right”><font color=’FFFFFF’ size=’-1′ face=’Tahoma’><strong>Points: </strong></font></td>
<td width=”50%” align=”left”><font color=’FFFFFF’ size=’-1′ face=’Tahoma’><strong><? echo $points; ?></strong></font></td>
</tr>
</table>
<br>
<?
}
?>
</td>
</tr>
</table>
Thanks for any help
Aaron