Downloads for multiple item orders
I have created a page where customers can retrieve MP3 files that they have purchased.
I've noticed that when I add a Download button into my orderdetails.php page and it repeats for multiple items, every time I click on it, it downloads the same file (the top item in the results table) instead of the correct one.
This is my form containing the button:
<form method="post" name="downloadform" id="downloadform">
<input name="download" type="image" id="download" value="Download" src="../images/design/download2.gif" alt="Download" />
</form>
and the DFP2 SQL:
<?php
WA_DFP_SetupDownloadStatusStruct("WA_DownloadResult1");
if($_SERVER["REQUEST_METHOD"] == "POST"){
WA_DFP_DownloadFile("WA_DownloadResult1", "../downloads/", "".$row_WADAorderdetails['DetailDownloadFile'] ."", "[FileName]", false, false, false, "", "", "", "");
}
?>