RE: [PHP] Sessions
| From: | H Bartel | Date: | Mon, 26 Apr 2004 14:33:21 +0000 |
| Subject: | RE: [PHP] Sessions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184654@lists.php.net to get a copy of this message | ||
On 4/26/04 4:15 PM Vincent.dupont@ausy.be (Vincent DUPONT) wrote:
>As you create a session with session_start, you cannot check
>!$_SESSION because the session will always exist as soon as you cal
>session_start.
>
>what you could do is to add a value in you session when the user was
>logged in. For example $_SESSION['login']=true; and yo could also need
>$_SESSION['username']='John Smith';
Hi,
I can understand what you're saying and it does make sense to me. The
part which doesn't make sense now, is that my page does exactly what the
code says.
If I call this any page with the code part in it and didn't log in
before, I get redirected to the specified page.
I will just register username and password into my session and then work
with these values to check for authentication.
Thanks for your help,
Regards,
Holger