While() @_____@
Posted: Wed Jun 06, 2007 3:38 pm
Here's what I need to do. ._. What happens is, for the first name that comes up, it makes a <td> with a light beige (sp?) background, and then if there's another name, it'll do it in a darker color.
It'll only show the first one, "TEST1".
Code: Select all
$check = 'light';
if ($check == 'light')
{
while($rowz = mysql_fetch_array($results))
{
echo "<a href='pushalong.php?name={$rowz['firstname']} {$rowz['lastname']}'>{$rowz['firstname']} {$rowz['lastname']} </a>";
echo "<br>";
echo "<tr><td bgcolor='#FECB98' width='40%'>TEST1</td></tr>";
$check = 'dark'; }
}
if ($check == 'dark')
{
while($rowz = mysql_fetch_array($results))
{
echo "<a href='pushalong.php?name={$rowz['firstname']} {$rowz['lastname']}'>{$rowz['firstname']} {$rowz['lastname']} </a>";
echo "<br>";
echo "<tr><td bgcolor='#FEB66D' width='40%'>TEST2</td></tr>";
$check = 'light'; }
}