<?php
require_once('../core/db.php');
//get the information for the form
$query = "select id,artist,track from bridal_songs";
$result = mysql_query($query);
//check result to see if it's empty or not. if not, print form.
if(mysql_num_rows($result)==0){
echo 'There are currently no entries.'; // if nothing. let em know.
} else {
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { //while there is something to return, loop.
?>
<table border=1 cellpadding=5 cellspacing=2>
<tr>
<th colspan=2 align=center></th></tr>
<tr>
<td valign=top>Track:<br />
<?php echo $row['track']; ?>
</td>
<td align=left>
Artist:<br />
<?php echo $row['artist']; ?>
<br />
</td></tr>
<tr><td colspan=2 align=center>
</td></tr></table>
<?php
} // close while loop brace
} // close else brace
} //close if no action brace
?>