On 8/21/05, Bob <[EMAIL PROTECTED]> wrote:
> Is it safe to use:
> header("refresh: 0; url=http://www.website.com/page1.php");
>
> Googling for it produces mixed results.
> Some say it's ok and others say it's unreliable?
>From what I know - If you use the HTML equivelant, - you are hoping
that the persons browser will correctly interpret the command &
re-direct the page....
Doing it in PHP - The command is sent before any HTML output, & the
actual Server re-directs the person.... - Before it (HTML) gets to the
persons browser / screen...
Therefore (of little I know of this) - I think it works well..
BUT - To be sure - You might want to do this :- (i'll assume you have
put the header command in an IF statement - When a certain condition
is met...)
header("refresh: 0; url=http://www.website.com/page1.php");
echo "<HTML>
<BODY>
<FONT COLOR='red'>Error</FONT>
<BR><BR>
Please click <A HREF='http://www.website.com/page1.php'>this link</A>
to contrinue.
<BR><BR>
</BODY></HTML>\n";
exit;
(change the text as necessary...)
For anyone that isnt re-directed - It will show the text / link - to
continue....
--
G Stewart
http://e-services.kwister.com/
NZ community groups - [EMAIL PROTECTED]
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hdbbnkd/M=362335.6886445.7839731.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1124588387/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In
low income neighborhoods, 84% do not own computers. At Network for Good, help
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/