MySQL Forums
Forum List  »  PHP

Re: Upload and download pdf-file to mySQL
Posted by: Chrisa Torain
Date: October 28, 2014 01:02AM

May this example will help you to understand. Just go through this.
$gotten = @mysql_query("select * from pdf order by pid desc limit 1");
$row = @mysql_fetch_assoc($gotten);
$bytes = $row[imgdata];
header("Content-type: application/pdf");
header('Content-disposition: attachment; filename="thing.pdf"');
print $bytes;

Options: ReplyQuote


Subject
Written By
Posted
Re: Upload and download pdf-file to mySQL
October 28, 2014 01:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.