error is : mysql_fetch_array() expects parameter 1 to be resource, boolean given in line 28

<?   $result = mysql_query("SELECT * FROM chart1");
      while ($row = mysql_fetch_array($result))
      {
         echo $row['price'];
         }
         ?>

Recommended Answers

There was an error, did you connect properly?

$result = mysql_query("SELECT * FROM chart1") or die(mysql_error());
Jump to Post

All 3 Replies

There was an error, did you connect properly?

$result = mysql_query("SELECT * FROM chart1") or die(mysql_error());
$result = mysql_query("SELECT * FROM chart1") or die(mysql_error());

not working

I know. What error do you see?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.