Jump to core Code .
Copy code The Code is as follows: if (isset ($ link ))
{
Header ("HTTP/1.1 303 see other ");
Header ("Location: $ link ");
Exit;
}
The following is a foreign Article Article Description.
Hey Chris:
On wed, Jan 26,200 5 at 12:28:19 pm-0500, csnyder wrote:
>
> <? PHP
> // Process Form
>...
> // Redirect to results page
> Header ('HTTP/1.1 303 see other ');
> Header ('location: result.html ');
> Exit ('form submitted, <a href = "result.html"> continue </a> .');
>?>
Good point. But some feedback here. The optimail syntax is:
<? PHP
// Process Form
//...
// Redirect to results page
Header ('status: 303 see other ');
Header ('location: http://www.jb51.net/result.html ');
?>
Here's why...
Using "status:" in the header is better because the resulting headers from
Apache are more correct:
HTTP/1.1 303 see other
Instead
HTTP/1.1 303
Additionally, one doesn' t really know which version of HTTP is being used,
So why potentially cause problems by trying to guess.
The specs say location headers must have a complete URI in them, not just
The path.
Lastly, you don't want any output after the location header.
Later,
-- Dan