help needed with Sessions and Regsiter_globals = on
Posted: Wed Apr 23, 2003 4:16 pm
Hey guys,
I've been working with sessions with register globals turned off and now i have to work with them turned on. Only problem is that they don't seem to be working as well for me now. I use them to keep track of different members for an online game. When a new member logins they get their own session and thats how i know who they are and what to display for their account, etc. Can any of you give me a crash course in sessions with register globals on that pertains to members where i have to have their name and password to get their information? I've tried going to the PHP manual lots of times but nothing seems to be working. I'd really appreciate it.
The way i've currently been doing it is:
However this doesn't seem to be working with globals on. Thanks for any help you can give.
Jade
I've been working with sessions with register globals turned off and now i have to work with them turned on. Only problem is that they don't seem to be working as well for me now. I use them to keep track of different members for an online game. When a new member logins they get their own session and thats how i know who they are and what to display for their account, etc. Can any of you give me a crash course in sessions with register globals on that pertains to members where i have to have their name and password to get their information? I've tried going to the PHP manual lots of times but nothing seems to be working. I'd really appreciate it.
The way i've currently been doing it is:
Code: Select all
login.php
//they enter their login name and password
account.php
session_start();
define("SESSION_LENGTH", 60);
$_SESSIONї"name"] = $_POSTї'login'];
$_SESSIONї"password"] = $_POSTї'password'];
$authname = $_SESSIONї"name"];
$authpass = $_SESSIONї"password"];
//then i use $authname and $authpass to pull their information from the databaseJade