I want the data to be fetched into a html table.
Edited:
<?php
mysql_connect("localhost","root","");
mysql_select_db("music_world");
$result = mysql_query("SELECT * FROM all_songs");
echo "<table border='1'>";
echo "<tr> <th>Serial No.</th> <th>Title</th> </tr>";
while($row = mysql_fatch_array( $result )) {
echo "<tr><td>".$row['id']."</td><td>". $row['title']."</td></tr>";
}
echo "</table>";
?>
I don't know where is the problem. this code is suppose to work but its not. why am I getting this error:
Fatal error: Call to undefined function mysql_fatch_array() in D:\xampp\htdocs\one.php on line 7