Possible Duplicate:
Forcing to download a file using PHP
I am currently building a site where it lets users upload and download files, I am following a tutorial, but am changing it, I want this page to show a download link so that the user can download the file. The files are stored in a MYSQL database.
Here is the code,
<?php
include ("Design/header.php");
require ("connect.php");
$itemid = $_GET['album'];
$file = mysql_query ("SELECT * FROM albums WHERE fileid=''");
include ("Design/footer.php");
?>
I just can't think of how to make a download link just for this file and for it to change for each other file on the site.
I will give more detail,
I have it setup so that when the file is uploaded it is given a unique id, and when the file is click on the site it brings the user to "viewfile.php?file=".$row['fileid']."'>" but on the viewfile.php page I want it so that when "Download File" is click that it downloads the correct file.
Also the code is not finished.