Again with sessions
| From: | Lorenzo | Date: | Fri, 29 Jul 2005 23:12:48 +0000 |
| Subject: | Again with sessions | ||
| Groups: | php.general.es | ||
| Request: | Send a blank email to general-es+get-55496@lists.php.net to get a copy of this message | ||
Hi, now at least I' ve made work some sessions :)
I want to know how is the logic for a basic login.
I' ve made: (dunno if it' s ok)
Index.php
db_conncet.php
Auth.php
Index draws the textfields and passes it to Auth.php which opens a session
with username and userlevel(taken from the db after seeking the user)
Now I have one logical problem I think, how can I do to know if the user has
a registered session before drawing the login textfields ?
Because I can' t put: if (!session_is_registered($username)) First because
it' s empty and second because I have to be able to do this check without
asking the user to reenter his username just to see if he has a session.
How would you design a basic login like this ?
Sorry for my english, I hope that at least it is understandable, I think I
just invented a word :)
Thanks !!
Lorenzo Cuturi Baccini.