Re: redirection with PHP and closing windows?
| From: | Jason Barnett | Date: | Wed, 21 Apr 2004 04:11:13 +0000 |
| Subject: | Re: redirection with PHP and closing windows? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184086@lists.php.net to get a copy of this message | ||
Andre wrote:
I want to be able to process a PHP script and then if successful redirect to another page. Is there a good way to do this with PHP or do I need to stick to Javascript?You should check out the header() function. http://www.php.net/header There are some common pitfalls with this, most notably you can't use the header() function in a page if there is any html output before header(). This includes an empty line before your <?php tag, so be careful.
Also, is it possible to close a window that is running a .PHP page via a link or again, just stuck with Javascript?I don't know of anything in PHP that will close a window... but I would be interested to know if anyone else has done this! I'm pretty sure that JS is the only way to do this.
TIA!! Andre