Best group member,

 

I have this process:

 

1. Fill out a form on a web page

2. Lands on a thank you page and force a download of a pdf

 

Right now I solve this by outputting the thank you page and then using a
javascript to redirect to the download.php that consist of the following:

 

header('Content-type: application/pdf');

header('Content-Disposition: attachment; filename="eguide.pdf"');

readfile('http://www.thedomain.com/download/eguide.pdf'); 

 

Unfortunally it seams like some browsers blocks my javascript that redirects
to that address. If JavaScript is enabled, this works fine.

 

How would you solve this? Any method in PHP? I was hoping to be able to do
the thing that download.php does in the same file as the output of my thank
you page.

 

Thank you.

 

 

 

Reply via email to