>i'm new and i'm trouble with this code :'( can U help me please ?? This would be much easier if you told us what was going wrong...
I'll point out the ones I see, but it's just a guessing game (not a very fun guessing game). >while ($cd_tbl = mysql_fetch_array ($result)) >{ >if(is_int("$cd_id") = TRUE) This will never be TRUE... "$cd_id" *FORCES* $cd_id to be a string. And, actually, you want == here, not = The = is used to store a value in something. The == is used to test for equality Since it comes from the database, $cd_id will probably always be a string anyway... You can't do this: >echo "<td bgcolor="$bgcolor"><font face=Verdana size=1><b>$cd_id</b></font></td>"; ^ ^^ ^ ^ | |\ | | PHP sees And \ Way too confused by now... this as the this \ beginning is the \ of a string. *END* of\ that This is junk... string. You want: echo "<td bgcolor=\"$bgcolor\"><font face=Verdana size=1><b>$cd_id</id></font></td>"; Or, since HTML accepts ' as well as ", so long as they are 'matched' echo "<td bgcolor='$bgcolor'><font face=Verdana size=1><b>$cd_id</id></font></td>"; Or, if you only care about browsers working, and not some pie-in-the-sky W3C proclamation of style: echo "<td bgcolor=$bgcolor><font face=Verdana size=1><b>$cd_id</id></font></td>"; You should, however, realize that many, many, many people will *NOT* have Verdana font installed. They will see that icky Times font. You can list multiple fonts: echo "<td bgcolor=$bgcolor><font face=Verdana,Helvetica,Arial size=1><b>$cd_id</id></font></td>"; 'Course, if you start putting spaces in the font, you *NEED* the quotes: echo "<td bgcolor=$bgcolor><font face='Verdana,Comic sans,Helvetica,Arial' size=1><b>$cd_id</id></font></td>"; You may also want to tack \n at the end of every string, so when you do "View Source" in your browser, you can see something intelligible. echo "<td bgcolor=$bgcolor><font face=Verdana size=1><b>$cd_id</id></font></td>\n"; -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php