> For example, if I show the student: echo "Welcome &userid" at the
login
> script, when that student goes to some other page that is does not
holds
> the login script, it would print "Hi " instead of "Hi Whatevername".
How
> can I keep track of this things??? Cookies which I want to avoid???

<?
Session_start();
$_SESSION['userid'] = $userid;
?>

Now you have $_SESSION['userid'] on any page you use session_start() on.
That's the idea of sessions...passing variables among pages...

You use the same technique to make sure a person logged in. When the
username and password match, set a session variable like 'logged-in'. On
every other page, check for this variable. If it exists, they are logged
in, if not, then redirect to the log in page.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to