RE: [PHP] register session
| From: | Vlad Kulchitski | Date: | Wed, 03 Apr 2002 17:46:49 +0000 |
| Subject: | RE: [PHP] register session | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-91338@lists.php.net to get a copy of this message | ||
Kris,
Idi na phpbeginner.com tam est 'tutorials' dlya tebya.
Vlad
-----Original Message-----
From: Kris Vose
Sent: 3 квітня 2002 р. 12:42
To: php-general@lists.php.net
Subject: [PHP] register session
I am trying to register a session after verification of username and password.
It looks like this:
session_start();
If ($name = $aa) && ($username = $ab)
{
session_register("valid_user");
echo "<script>window.location=\'admin_.php'\</script>";
}
else
{
echo "Your username/password is incorrect";
}
On each page that I want secure I include a script that checks for the session_register(). It looks
like this:
session_start();
global $valid_user;
if (session_is_registered("valid_user"))
{
echo "you are registered";
}
else
{
echo "you are not registered";
}
This code is not working and it sends a warning message like this: Warning: Cannot send session
cache limiter - headers already sent (output started at
/var/www/focus-capital/BetterBus/1/admin_.php:7) in /var/www/focus-capital/BetterBus/1/admin_.php on
line 126
you are registered 1 - Send Mail
I have not used sessions before and I am wondering if I am doing some wrong with the syntax?