Is there any reason I can't just use a JavaScript redirect from a PHP login
handling script since I can't seem to get the header("Location: URL");
function to work?  Any security concerns or anything else?  As far as I can
tell, all calls to header fail as soon as I attain variables based on a POST
submission.  See example below.

    $username = $_POST[username];
    $password = $_POST[password];

    if(some username/password format verification) {
        query the database
        if($password matches pass in database) {
            $email = $Row[0];
            $memberID = $Row[1];
            //header("Location: URL");        This doesn't work.
            print("<script language=\"JavaScript\">window.location =
        else {
            print("That didn't work...");
    else {
        print("Please enter your username & password.");

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to