Re: header("Location: page.php") not redirecting

From: Date: Mon, 01 Dec 2003 22:18:21 +0000
Subject: Re: header("Location: page.php") not redirecting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-171526@lists.php.net to get a copy of this message
Hi, Tuesday, December 2, 2003, 7:17:58 AM, you wrote: r> Hi all, r> I have this in a template: r> $redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar"; r> header("Location: $redirect"); r> Only, nothing happens when this code is executed. Nothing. It gets r> completely ignored. r> I even tried: r> $redirect = "viewclient.php?id={$_REQUEST['id']}&foo=bar"; r> echo $redirect; r> header("Location: $redirect"); r> to try and throw an error, but all that happens is the value of r> $redirect gets sent to the screen and then rest of the page is r> displayed. I know the code block is getting executed, but I have no r> idea WHY the header() function is not doing its job. r> Any thoughts? Please CC me on the post since I am on the digest. r> Thanks Try adding exit; after the header call. -- regards, Tom

« previous php.general (#171526) next »