| Posted by Carl Pearson on 01/12/07 15:40 
Koncept wrote:> In article <12qdd8p56ccv3b8@corp.supernews.com>, Hendri Kurniawan
 > <ask-me@email.com> wrote:
 >
 >> Simply add exit() after your header statement to:
 >>
 >> <?php
 >> session_start();
 >>   if ($_GET["mode"] == "logout") {
 >>    header("Location: index.php");
 >>    exit();
 >>   }
 >> ?>
 >>
 >> Hendri Kurniawan
 >
 > I agree with Hendri. This is "exit" what is missing from your code.
 > Make sure to always place exit() after redirection or use buffers.
 >
 
 Right.  A small function I use for redirection...
 
 function Redirect($Url = "/")
 {
 echo "<script
 language='JavaScript'>document.location.href='".$Url."'</script>";
 exit;
 }
 [Back to original message] |