note 103619 added to function.header

From: Date: Fri, 22 Apr 2011 22:33:50 +0000
Subject: note 103619 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-179095@lists.php.net to get a copy of this message
thanks marcel glacki, I wanted to redirect my page, after displaying a status result from feedback form submit click, to the home page of the website. I tried displaying the status message for 'n' seconds, before redirecting to the homepage, using the 'sleep()' function but I was stuck with the header ("Location=$url") command, as it always returned the message "headers already sent", after displaying the status message, and the page was stuck there. using 'url' instead of 'location' along with the 'refresh' parameter, instead of 'sleep()' function, worked for me in this case. <?php header( "refresh:5;url=wherever.php" ); echo 'You\'ll be redirected in about 5 secs. If not, click <a href="wherever.php">here</a>.'; ?> ---- Server IP: 69.147.83.197 Probable Submitter: 1.38.199.243 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/103619 Del: integrated -- https://master.php.net/note/delete/103619/integrated Del: useless -- https://master.php.net/note/delete/103619/useless Del: bad code -- https://master.php.net/note/delete/103619/bad+code Del: spam -- https://master.php.net/note/delete/103619/spam Del: non-english -- https://master.php.net/note/delete/103619/non-english Del: in docs -- https://master.php.net/note/delete/103619/in+docs Del: other reasons-- https://master.php.net/note/delete/103619 Reject -- https://master.php.net/note/reject/103619 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#179095) next »