[phplib] page_open() and if...else From: Mikhail Avrekh (ami <email protected>)
Date: 07/31/00

Hello,

Part of my site is supposed to be password-protected, so there is a login
form which prompts a user for id/password and calls the following script:

<?

$auth = new DB_Sql;
$auth->query("select * from table where pwd=$pwd and id=$id");

if ($auth->next_record()) {

        page_open(array("sess"=>"My_Session"));
        $sess->register("id");
        page_close();

        include "nextpage.php3";
} else {
        print "Your password is not in the database";
        exit;
}

?>

This worked fine until I inserted the page_open -- register -- page_close
block (I now need to re-use the id in subsequent pages), but now for some
reason immediately after page_open() is called, the script jumps to } else
{, gives the error message and exits. Am I completely missing something
obvious here ?

Thanks !

M.

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>