Javascript.. bah humbug.  :)

Carl, you can avoid these issues by using output buffering allowing you to
call header() whever you want in your script.

<? // example..
ob_start(); // buffer output
echo "this is output you'll never see";
header("Location: thankyou.html");  // header redirect
ob_end_flush(); // flush output

- Kevin

----- Original Message -----
From: "Johnny Martinez" <[EMAIL PROTECTED]>
To: "'Carl Furst'" <[EMAIL PROTECTED]>
Sent: Friday, June 13, 2003 10:28 AM
Subject: RE: [PHP] Redirects in PHP

> try a delayed javascript redirect. location header must be in the header
> whichprevents your visitor from seeing html...thats irritating. i miss the
> ASP "response.redirect" which can be placed anywhere
> J
> -----Original Message-----
> From: Carl Furst [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 13, 2003 9:23 AM
> To:
> Subject: [PHP] Redirects in PHP
> I want to do one of those redirect pages where a php script prints HTML
> saying "sorry we're not here, we're redirecting you to the right location"
> and then after about 2-3 seconds a new location header gets printed and
> are transported to the new location. I see this everywhere but don't know
> how it's done.
> I tried this by printing the "Location" header first and then the text and
> it just
> relocated me without seeing the text. I tried printing the text first and
> then the "Location" header and php complains that my header was already
> and I
> can't modify it to relocate.
> How do you do this?? Is there something in the header I have to specify to
> wait before it relocates? Do I have to do it manually by printing the
> tell the script to wait and then clear the header somehow and send a new
> (can that be done?) I looked at HTTP1.1 docs and I didn't really get
> anywhere.
> Any ideas?
> Carl.
> --
> PHP General Mailing List (
> To unsubscribe, visit:
> --
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to