Re: redirecting to a success page

From: Date: Mon, 22 Nov 2004 14:30:49 +0000
Subject: Re: redirecting to a success page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-202676@lists.php.net to get a copy of this message
On Mon, 2004-11-22 at 09:13 -0500, Judson Vaughn wrote: > Group, > > I have a create_login.php page, which works (it inserts data into the > database), but I need for the script once executed to redirect to a > success.php page. > > It doesn't do this and I can't figure out how to do it. I've included a > portion of the script below. This was created by Dreamweaver MX and > modified by me. > > The original script, created by Dreamweaver, gives an error that says > header has already been sent. I tried different options to no avail. I > realize this script is now seriously hosed but thought I would include > it anyway since others may be using Dreamweaver. > Sounds like you are displaying information then trying to redirect a user? The way the internet works is that you load a page...and the browser shouldn't be sent more headers until the next browser action. Javascript can do this with a meta refresh, or you can use ob_start() at the start of your php code, which will allow you to send headers at any point during your php code, as it waits until it goes through all your php code before sending any headers. -Robby -- /*************************************** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | robby@planetargon.com * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting & Development * --- Now supporting PHP5 --- ****************************************/

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
« previous php.general (#202676) next »