Please tell me how to implement the functionality. The site has a form, after submitting the form, the script should:
process data
give pdf document to download to user
redirect the user to the page with thanks
With the first point everything is fine, the problem appeared with the last two
$filename = './handbook.pdf'; header("Content-type: application/x-download"); header("Content-Disposition: attachment; filename=$filename"); readfile($filename); header( 'Location: ../end.html', true, 301 ); The function header () can be called if data has not yet been transmitted to the client, but there has already been data transfer.
Help implement the functionality
Thank!