Still stuck on Sessions :-(
| From: | chris at planetoxygene dot com | Date: | Wed, 18 Jul 2001 21:42:31 +0000 |
| Subject: | Still stuck on Sessions :-( | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-10558@lists.php.net to get a copy of this message | ||
Hi there everyone,
Thanks to everyone that replied to my session help - but i'm still having problems. I use the
below to open a session - Say at the start of my website:
<?php
session_start();
session_register("user"); $user="$username";
session_register("pass"); $pass="$password";
?>
where username and pass would be defined by a variable - either from a form or hardcoded.
Now, if I use <?=("$user")?> on the SAME page as this is, it displays the varibles,
but if I move to another page on the website via a link the session seems to have ended or something
as it says $user is undefined. Do I need to add anything to each page where a session is needed so
that it grabs the variables before I can use them? Or am I doing something totally stupid?
I've tried it on my Win2000 system AND on my Linux server.
Please help, I am getting totally frustrated and need to get all this working within 2 weeks :-(
Thank you
Regards
Chris Payne
www.planetoxygene.com