Re: php redirection..
| From: | Stut | Date: | Tue, 12 Dec 2006 17:20:47 +0000 |
| Subject: | Re: php redirection.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245765@lists.php.net to get a copy of this message | ||
bruce wrote:
i want to be able to display some text/content and to then redirect the user to another page. basically: cat.php -echo " test content<br>" -echo " more test content<br>" //redirect user echo" <script>And so you should be what with it being a Javascript question and this being a PHP list. Anyhoo, I don't get your confusion. The browser will run the script as it loads it from your site. Ergo, it redirects before it displays what you have output. I suggest you Google for examples of the settimeout Javscript function - that's what you need to delay the redirect. -Stutlocation.href='foo.php';</script> "; --------------- foo.php -echo "i'm here" should be pretty simple... however, in my test, without the script/location.href i display the content ok. when i add the script/location.href, i get redirected, but the content is never displayed... any thoughts/samples/pointers on what might be going on, and how this should really be accomplished.. to be honest, i'm embarrassed to even be raising this here!!