Hi
I have a select menu which populates ok from database.
My question is. How do |I get it to get all tracks from the selected artist.. (which are in table `title`)
Ant help would be appreciated, 
Code:
<?php
include("connect.php");
?>
<form>
<select>
<?php
$sql="SELECT DISTINCT `artist` FROM billboards ORDER BY `artist`";
$result =mysql_query($sql);
while ($row=mysql_fetch_assoc($result)){
?>
<option value ="<?php echo $row['artist'] ?>" ><?php echo $row['artist'] ?></option>
<?php } ?>
</select>
<input type="button" value="Get Tracks" onclick="" />
</form>
I also have the following code which displays the data
Code:
echo "<body bgcolor=\"#EDD7F1\" text=\"#733582\" link=\"#FF3399\" vlink=\"purple\" alink=\"red\">";
echo "<p align=\"center\"><b><font size=\"6\" color=\"fuchsia\">1946</font></b></p> ";
echo "<center><table border=\"1\">
<tr>
<td>
<p align=\"center\"><b><font color=\"fuchsia\">Artist</font></b></p>
</td>
<td>
<p align=\"center\"><b><font color=\"fuchsia\">Song Title</font></b></p>
</td>
<td>
<p align=\"left\"><b><font color=\"fuchsia\">Play Song</font></b></p>
</td>
<td>
<p align=\"center\"><font color=\"fuchsia\"><b>Download</b></font></p>
</td>
</tr></center>";
$i = 0;
while($row = mysql_fetch_array($result))
{
$i++;
echo " <tr>\n";
echo " <td align=\"center\">{$row['artist']}</td>\n";
echo " <td align=\"center\">\n";
echo " {$row['title']} \n";
echo " </td>\n";
echo " <td align=\"center\">\n";
echo " <object type=\"application/x-shockwave-flash\" data=\"player.swf\" width=\"190\" height=\"25\" id=\"audioplayer1\"><param name=\"movie\" value=\"player.swf\" /><param name=\"FlashVars\" value=\"playerID=1&bg=0xf8f8f8&leftbg=0xFF00CC&lefticon=0xffffff&rightbg=0xFF00CC&rightbghover=0xb35884&righticon=0xffffff&righticonhover=0xffffff&text=0x666666&slider=0x666666&track=0xFFFFFF&border=0x666666&loader=0x9FFFB8&soundFile=./Files/{$row['filename']}\" /><param name=\"quality\" value=\"high\" /><param name=\"menu\" value=\"true\" /><param name=\"bgcolor\" value=\"#EDD7F1\" /></object> \n";
echo " </td>\n";
echo " <td align=\"center\">\n";
echo " <p align=\"center\"><a href=\"./Files/{$row['filename']}\"><img src=\"download.gif\" border=\"0\"></a></p>\n";
echo " </td>\n";
echo " </tr>\n";
}
Bookmarks