In fact, if I have to redirect, and I am not sure about headers are sent or
not, I usually do:
print('<SCRIPT>window.location=somewhere.php</SCRIPT>');
That way I can always do the redirection.
SanTa
----- Original Message -----
From: "Andrew Ballard" <aballard@xxxxxxxxx>
To: "David Stoltz" <Dstoltz@xxxxxxx>
Cc: <php-general@xxxxxxxxxxxxx>
Sent: Friday, December 05, 2008 3:52 PM
Subject: Re: Help with IF ELSE
On Fri, Dec 5, 2008 at 6:42 AM, David Stoltz <Dstoltz@xxxxxxx> wrote:
I turned on error reporting (ALL) as you suggested. Nothing is being
sent to the browser....still doesn't work if the recordset isn't empty.
I'm wondering, is there any other way to do a redirect in PHP?
Thanks
That is how you do redirects in PHP. I believe you've got several
solutions to your actual problem by now (I like tedd's with either md5
or sha1), but since you asked...
There is a note in the documentation for header() that says HTTP/1.1
requires absolute URIs instead of relative ones as those in your
example.
You can also pass the response code in the third parameter (in which
case you can use the 303 SEE OTHER code that was intended for the
typical redirect rather than the 302 FOUND that most sites use), but
it isn' t necessary since PHP automatically sets a 302 on a Location:
header when the parameter is empty.
http://www.php.net/header
Andrew
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php