Im building a control panel on my website to cover a bunch of stuff for my website. It makes viewing each member and video, website etc alot easier. But im building a table for my members. And i have it layed out pretty good. but there's one issue. When you look across the coloum you can end up blocking the wrong user our changing the wrong password.
So i want to change each row with a diffrent color. (only 2 colors) that switch back and forth every time it gets echo'ed out. how would i do this??
$useryquery = "SELECT * FROM `members` ORDER BY id DESC ";
$useryquery = mysql_query($useryquery);
while($row = mysql_fetch_assoc($useryquery)){
$id = $row['id'];
$firstname = $row['firstname'];
$lastname = $row['lastname'];
$verified = $row['eamailactivated'];
$userinfo = $row['Blocked'];
$usertype = $row['Usertype'];
if($usertype == '1'){
$usertype = "<td colspan='2' align='center'>Unavailable.</td>";
}else{
$usertype = "<td width='50'><center><a href='index.php?block=$id'>Block</a></center></td><td width='60'><center><a href='index.php?unblock=$id'>Unblock</center></td>";
}
if ($userinfo == '0'){
$userinfo = "<font color='green'>Active</font>";
}else{
$userinfo = "<font color='red'>Blocked</font>";
}
if($verified == '0'){
$verified = "<font color='red'>Unverified</font>";
}else{
$verified = "<font color='green'>Verified</font>";
}
$name = "$firstname $lastname";
echo "<tr><td><a href='http://www.daparadise.com/profile.php?id=$id'>$name</a></td>
<td width='80' align='center'>$userinfo</td>
<td width='80' align='center'>$verified</td>
<td width='130'><center><a href='index.php?cp=$id'>Change Password</a></center></td>$usertype</tr>";
}