<html>
<head>
<title>Reading and Displaying Multiple Records (song table)</title>
</head>
<body>
<?php
$db = mysql_connect("localhost", "mark_test", "") or die("could not connect ". mysql_error());
mysql_select_db("mark_test",$db) or die("could not select: error=" . mysql_error());
$result = mysql_query("SELECT * FROM songs",$db) or die("query failed! error=" . mysql_error());

while ($rec = mysql_fetch_array($result)) {
echo("id: " . $rec["songid"] . "<br/>");
echo("song: " . $rec["song"] . "<br/>");
echo("artist: " . $rec["artist"] . "<br/><br/>");
}
?>
</body>
</html>