> -----Original Message-----
> From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> Sent: 03 July 2002 21:17

> It's a good idea to get in the habit of doing:
> header("Location: xxx");
> exit;
> There's no point in sending any more data after the Location: 
> header anyway,

I can't let this go unchallenged -- what happens if you're sending this to a
browser which *doesn't* honour the "Location: " header, but *is* capable of
displaying any attached page content?  The poor user will be left with a
completely blank screen, and no hint of why.  In fact, the HTTP/1.1 spec
(RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616.html) even says:

> Unless the request method was HEAD, the entity of the response
> SHOULD contain a short hypertext note with a hyperlink to the
> new URI(s). 

So at the very least you should do something like this:

    header("Location: xxx");
    <TITLE>Moved to xxx</TITLE>
      <P>This page has moved to <a href="xxx">xxx</a>.



Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to