I'm having a problem downloading a pdf from a MySQL blob. What I'd like to do is have the download box pop up asking whether to 'open' or 'save' the file. Right now, the user clicks on a download link which opens a page that grabs the file from the blob:
$filename = mysql_result($result, 0, 'file');
Is there a way in PHP to take that $filename variable and cause a download dialogue box to pop up allowing the user to pick whether that want to open or save it?
Thanks!
blob download
Moderator: General Moderators
- evilchris2003
- Forum Contributor
- Posts: 106
- Joined: Sun Nov 12, 2006 6:43 am
- Location: Derby, UK
-
timclaason
- Forum Commoner
- Posts: 77
- Joined: Tue Dec 16, 2003 9:06 am
- Location: WI
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Download
The database is holding the binary data, not the file system.timclaason wrote:I think that's more of a OS thing.
You could do:Code: Select all
Header("Location: ". $filename);