On Apr 25, 2007, at 8:25 AM, Don Don wrote:

Hi all, whats the best way to perform a redirect after out put has started ? using header:location will not work unless theres been no output.

I usuall use the method below, however am concerned for browsers that do not support javascript.

  $location = 'index.php';
  echo "<script language='javascript'>\n";
  echo "document.location.href = '" . $location . "';\n";
  echo "</script>\n";

Use this at the beginning of the script (before output is displayed):

ob_start();


~Philip

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

Reply via email to