Re: redirect using php

From: Date: Wed, 05 Apr 2006 13:33:18 +0000
Subject: Re: redirect using php
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-233258@lists.php.net to get a copy of this message
Mark Kelly wrote:
You can also use something like: echo "<meta http-equiv=\"Refresh\" content=\"0;url=$from_page\">";
There's no need to use a meta tag to mimic HTTP headers. PHP provides the header() function. I have been using that method when I got part-way through some processing that produces output, and hit something that requires a redirect. As I understand it headers are no use to me here.
You're still using a Refresh header. The difference is that you're using a meta tag to mimic the header (e.g., http-equiv). Using meta: <meta http-equiv="Name" content="Value" /> Using header(): <?php header('Name: Value'); ?> Hope that helps. Chris

« previous php.general (#233258) next »