Help with simple php page linking question
I posted this question yesterday but for some reason it isn't showing up on the forum, so I'm reposting.
I have a small php file to force a download when a user clicks on a link:
<?php
header ("Content-type:application/pdf");
header ("Content-Disposition:attachment;filename='form.pdf'");
readfile ("form.pdf");
?>
I need to add code to this script which will automatically redirect the user to the home page within the same browser window, either during or immediately after the file downloads. And if it is possible, prevent the browser back button from returning the user back to the page that contains the download link.
I tried adding this after the readfile line: echo "<a href="mywebsite.com/index.html" /a>";
But that failed miserably, a monument to my limited php skills. Can someone help me out?
