<?php

$Host = "";
$User = "";
$Password = "";
$DBName = "";
$TableName = "";

$Link = mysql_connect($Host, $User, $Password);

$Query = "SELECT * FROM $TableName";

$Result = mysql_db_query($DBName, $Query, $Link);


$ctr = 1;
print ("<table border=1 width=\"65%\" cellpadding=3 align=center>");
print ("<tr>");
print ("<th class=\"textOnWhite\">Song</th>");
print ("<th class=\"textOnWhite\">Artist</th>");

while ($Row =mysql_fetch_array($Result)) {
    print ("<tr>");
    $ctr = -$ctr;
    if( $ctr == 1) {
    print ("<td class=\"textOnWhite\">$Row[song]</td>");
    print ("<td class=\"textOnWhite\">$Row[artist1] $Row[artist]</td>");
    }
    else {
    print ("<td class=\"textOnRed\">$Row[song]</td>");
    print ("<td class=\"textOnred\">$Row[artist1] $Row[artist]</td>");
    }

print "</tr>";

}
print "</table>";




mysql_close($Link);

?>

Thanks,
Scott


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to