Page 1 of 1

Redirect

Posted: Fri Oct 16, 2009 9:45 am
by ridgeman
I have a page that I send people to to download a file. That page is PHP. At the end of the download, I want the people sent back to my original page which is HTML. Any help would be appreciated.

Re: Redirect

Posted: Fri Oct 16, 2009 9:52 am
by desperado
if your dowload page is all script (you do not output text like "downloading file...please wait", then add the following at the end of the script:

Code: Select all

header('Location: http://www.example.com/');
if you do spit out something, do it with javascript:

Code: Select all

<script>
setTimeout ("window.location.href='http://www.example.com/'", 1000);
</script>
(you can echo this in php, it will work too.)

Re: Redirect

Posted: Fri Oct 16, 2009 10:25 am
by ridgeman
Thanks, I'll give it a try.