Hi All,
I've been struggling with a number of different snippets of code to get the following script to force download. Everything I try won't connect. Unfortunately, because I'm such a novice, I can't find where the problem lies. Could anyone help me 'plug in" the right code to make this work correctly?
As always, Thanks!
$sql = "select * from mp3_library, customer_orders where (email='$email' and (customer_orders.item1=mp3_library.code or customer_orders.item2=mp3_library.code or customer_orders.item3=mp3_library.code or customer_orders.item4=mp3_library.code or customer_orders.item5=mp3_library.code))";
$result= mysql_query($sql) or die(mysql_error());
echo "<table border='0'>
<tr>
</tr>";
while($row = mysql_fetch_assoc($result))
{
echo "<tr>";
echo "<td>" . $row['artist'] . "</td>";
echo "<td> <td>";
echo "<td>" . $row['track'] . "</td>";
echo "<td> <td>";
echo "<td><form><input type='button' name='download' value='Download File' onclick='window.location = \"".$row['link']."\"' /></form></td>";
echo "</tr>";
}
echo "</table>";
?>