Re: redirecting

From: Date: Wed, 18 Feb 2004 06:42:18 +0000
Subject: Re: redirecting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-178062@lists.php.net to get a copy of this message
ajay wrote:
hi! after having trawled through many google articles, i've been told that the best way to redirect a person is using header("Location:url"); the problem is, i have form that is posted to another php script. This script then processes the form and then writes up a html page and includes in that page any warnings etc. i want the user to have say 5s to read that page and then be redirected to another page. so i have something like //process form //write page sleep(10); header("Location:blah.php"); the problem is i get an error when the script gets to the header part, the error being Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\usydbasketball\subscribe_mailing_list.php:6) in c:\program files\apache group\apache\htdocs\usydbasketball\subscribe_mailing_list.php on line 67 so how do i workaround that? thanks regards
JavaScript or META refresh. You cannot send headers after you have sent content to the browser. (Let the war begin again ;) -- By-Tor.com It's all about the Rush http://www.by-tor.com

« previous php.general (#178062) next »