Is there a function like $_SESSION['user_name'] vs. $session_register('user_name') that would work on both? I tried $HTTP_SESSION_VARS["user_name"] but that didn't keep the user_name going into the next page, which causes the login to fail and send back to the login page.
Snippets as they are now (for 4.0.6): // this is the log in page <? session_start(); if ($user_name && $login_pass) { // if the user has just tried to log in from <FORM> session_register("user_name"); } if (session_is_registered("user_name")) { header("Location: content.php"); exit(); } .. rest of file ?>
// content.php
<?
session_start();
if (!session_is_registered("user_name")) {
header("Location: index.php");
exit();
}
die("check:".$user_name); <-- may actually accept the registry of user_name but still does not display it
.. rest of file ?>
On Monday, June 16, 2003, at 11:11 AM, Ford, Mike [LSS] wrote:
-----Original Message----- From: Hutchins, Richard [mailto:Richard.Hutchins@Getingeusa.com] Sent: 16 June 2003 17:08
session_start(); session_register("isRegistering");
$_SESSION["isRegistering"] = "true";
B'zzzzt! If you're using the $_SESSION array, then you MUST NOT use session_register() and friends.
(Well, ok, maybe that's overstating it a bit, but you still shouldn't do it!)
Cheers!
Mike