RE: [PHP] What is PHP-equivalent of ASP's RESPONSE.REDIRECT feature ?
| From: | John W. Holmes | Date: | Tue, 21 Jan 2003 01:56:07 +0000 |
| Subject: | RE: [PHP] What is PHP-equivalent of ASP's RESPONSE.REDIRECT feature ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-132335@lists.php.net to get a copy of this message | ||
> I am converting an ASP page to PHP and have difficulties in using PHP
> since
> I am new to it. I have an ASP code that would redirect page-viewer to
> respective page base on the input entered by viewer. How do I do this
> using
> PHP? Also, in ASP, there are features like Server.Transfer and
> Server.Execute that transfer control to another page.. Please advice
and
> thanks in advance.
You'll need to use the header() function.
Header("Location: http://www.domain.com/file.php");
You must call this before any output to the browser or use output
buffering. More information is available in the manual.
www.php.net/header
More than likely the ASP equivalents were wrappers to this header call.
---John Holmes...