RE: [PHP] Opening a new page when done

From: Date: Wed, 24 Oct 2001 13:56:57 +0000
Subject: RE: [PHP] Opening a new page when done
Groups: php.general 
Request: Send a blank email to php-general+get-72101@lists.php.net to get a copy of this message
just print the following at the point where you decide you want to redirect: <script language="JavaScript"> <!-- location.href="whereveryouwannago.php"; //--> </script> a better alternative is to send a redirection header with the response, but this depends on you not sending any HTML output to the browser before processing is complete: <?php header("Location: whereveryouwannago.php"); exit; // don't do any more processing after this redirect. ?> hope this helps. james -----Original Message----- From: Roy W [mailto:roydallas61@nospam.hotmail.com] Sent: 24 October 2001 14:39 To: php-general@lists.php.net Subject: [PHP] Opening a new page when done I have several scripts that when you complete a form it executes a PHP script. At the end of each script I have a simple statement saying it's done and then a place to hyperlink back to a given page: PRINT "Process complete. <a href=\"index.html\">Click here</a> to continue"; But what I really wanna do is just have the script code execute and when its all done - just take the user automatically to "index.html" or some other page. I know there's a command but cant seem to find it. Thought it might be "include()" but couldn't figure out my syntax Ideas? THANKS!!! :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#72101) next »