I am having troubles with the following script.  When executed I get the 500
internal server error page and an error: Premature end of script headers:
c:/php/php.exe in the log files.  If I comment out the header() line it
works fine.  I would like to redirect to the proper page based on login
pass/fail.  Can any one see what I am doing wrong?

<?
// Login script
//authenticate using form variables
$status = authenticate($f_user, $f_pass);

// if user/pass is correct
if ($status == 1)
{
        //initiate a session
        session_start();

        //register some session variables
        session_register("SESSION");

        //including the username
        session_register("SESSION_UNAME");
        $SESSION_UNAME = $f_user;

        //redirect to page
        header("Location: /worked.php"); //<-- problem area.
        exit();
}
else
// user/pass failed
{
        //redirect to error page
        header("Location: /failed.php");
        exit();
}

---snip---


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to