Ok I have a database with a field called key, which is a random 15 length string. For members that are logged in they are given a download link but I want to disguise the link as much as possible so people that are not registered can not direct link to it or pass it out.
Anyways, the download link example is:
http://domain.com/?key=98sgh32sdfjk31w
I want a way for that to be the link which does a simple query "select * from datafiles where key = '$_get[key]' "
in that table it also has the filename recorded under "filename" field.
Alright, so whats the best way approaching this to actually have that link work with pulling the filename from the database and giving them the pop up to download and save the file.
Thanks
EDIT: I cant use Header("link") because headers are already sent. So I want when they click http://domain.com/?key=98sgh32sdfjk31w it will popup the window to download like when you click on a .zip