RE: [phplib] Session and redirect From: Carlos Romero Mas (Carlos.Romero <email protected>)
Date: 03/28/01

> I would like to use the session ability of phplib as my provider
> only make the php's version 3.0.16 available.
> I wrote an index page with a simple form (user_id, password). The
> form's action is the page itself (index.php3).
> After a database query, the user should be redirected to an
> appropriated page like this:
>
> <index.php3's snip>
> if ($authenticated) {
> include("prepend.php3");
> page_open(array("sess" => "SessionID"));
> $sess->register("User_ID");
> page_close();
> if(!strcmp($User_ID,"opo")) {
> header("Location: opo.php3");
try header("Location: ".$sess->url("opo.php3"));
because if cookies are disabled your code not function properly.

> } else {
> header("Location: admin.php3");
> }
> exit;
> }
> </index.php3's snip>
>

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