liamallan
03-22-2010, 03:01 PM
i am working on a members list which displays everyone who is registered at site. i am trying to make admin a different colour from regular users so users know who admin are.
here is my attempt:
<table width="200" border="1" cellspacing="0" cellpadding="3">
<tr>
<td align="center"><strong><u>Registered Members</u></strong></td>
</tr>
<?php
while($rows=mysql_fetch_array($query)){
?>
<tr>
<td align="center">
<?php
if($rows['userlevel']= '9'){
echo '<a href="http://www.shiftysplayground.co.cc/userinfo.php?user='.$rows['username'].'"><font color="gold">'.$rows['username'].'</font></a>';
}
else{
echo '<a href="http://www.shiftysplayground.co.cc/userinfo.php?user='.$rows['username'].'">'.$rows['username'].'</a>';
}
?>
</td>
</tr>
<?php
}
?>
</table>
it works to some extent but all names in the table turn gold instead of just admin. can anyone tell me where i went wrong? thanx
here is my attempt:
<table width="200" border="1" cellspacing="0" cellpadding="3">
<tr>
<td align="center"><strong><u>Registered Members</u></strong></td>
</tr>
<?php
while($rows=mysql_fetch_array($query)){
?>
<tr>
<td align="center">
<?php
if($rows['userlevel']= '9'){
echo '<a href="http://www.shiftysplayground.co.cc/userinfo.php?user='.$rows['username'].'"><font color="gold">'.$rows['username'].'</font></a>';
}
else{
echo '<a href="http://www.shiftysplayground.co.cc/userinfo.php?user='.$rows['username'].'">'.$rows['username'].'</a>';
}
?>
</td>
</tr>
<?php
}
?>
</table>
it works to some extent but all names in the table turn gold instead of just admin. can anyone tell me where i went wrong? thanx