I've done this on other platforms ASP,Cold Fusion, but I need to know what's
the best way to do it on PHP.

1. grab username and password from POST vars.
2. select count(*) from users where username = '$username' and
password='$password'... something along these lines
3. if that user exists and password matches, set a flag on the user and send
them to the right page, otherwise increment failed attempts and send them
back to login page.

if (count > 0)

        $HTTP_SESSION_VARS["someflag"] = somevalue;
        header("Location: secretpage.php");

        header("Location: loginpage.php");

but apparently, i can't start/register a session and then redirect.  Is
there a better way to do this?


PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to