Place this code on a page (along with the PHP code to get the info from the DB and place it in the variables for the name/size/data, then link to that page.
Not all of the headers listed above are strictly necessary - in fact, only the Content-Type header is truly necessary to make the download work properly. The Content-Disposition header is good to include so that you can specify a proper filename; the others just help the browser handled the download better and can be omitted if you desire.