LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Using PHP to output HTML and download a fie

[ILUG] Using PHP to output HTML and download a fie

Conor Mac Aoidh conormacaoidh at gmail.com
Sun Feb 12 17:20:00 GMT 2012


Hi Niall,

You could try opening a new tab for the file download and then have the
confirmation HTML in the current tab?

Conor

http://conormacaoidh.com


On Sun, Feb 12, 2012 at 4:14 PM, Niall O Broin <niall at linux.ie> wrote:

> I'm trying to use the fpdf library with PHP to generate a PDF file and
> download that for the user which is fine as far as it goes, except that
> when the user clicks the submit button, having entered the necessary data,
> I want him to get a confirmation page AND have the PDF downloaded in one
> action. If I use fpdf's output method to download the file first, the
> confirmation HTML doesn't appear. If OTOH I first send the HTML, then fpdf
> complains that it can't send the file as the headers have already been sent.
>
> I know what's going on here - both fpdf and php's normal output are
> sending headers, and that's one lot of headers to many, so what I need to
> do is send a multipart result to the browser. However, I'm having a hard
> time finding an answer. Search terms including php, download, and pdf
> simply get way too may hits.
>
> This question is probably more proper to a PHP list, but I'm not on any of
> those, and the platform in use is Linux, so . . .
>
>
> Niall
>
> --
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug
> Who we are : http://www.linux.ie/
> Where we are : http://www.linux.ie/map/
>


More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell