Possible Duplicate:
Warning: mysql_fetch_* expects parameter 1 to be resource, boolean given error
I'm trying to echo a table's content but I'm getting an error with this line of code:
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql="SELECT * FROM $tbl_name ORDER BY id DESC";
// OREDER BY id DESC is order result by descending
$result=mysql_query($sql);
while($rows=mysql_fetch_array($result)){ // Start looping table row