
March 24th, 2000, 07:12 AM
|
|
Junior Member
|
|
Join Date: Mar 2000
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
hello
I'm working on a Usersystem, and currently it works kind-of like this:
the user logs on on the net,
form method=post action=$php_self)
when the username/password was sent, it calls the function to check username/password, if they match with those in the database, a cookie is set containing the password md5 encrypted and some additional information (like group the user is in).
I've made everything with one if-loop...
before it enters the if-loop, the verification function is called, afterwards it enters the if loop, checks to which group the user belongs (reads it from the cookie). If the cookie isn't set, it prompts the user the login form.
My problem is that it seems like the cookie isn't set fast enough because it prompts the user to login again. If loging in again, everything works fine. the cookie gets set the first time you login.
I'm asking myself now what may cause this, if anyone already had a similar problem and if yes, how he got around with it.
I don't like the idea of splitting the login-, verification- and 'main'-part(s) of the script into 3 different files. But if there's no workaround for that... If you want to see the source code, drop me an e-mail and I'll send it to you.
greetings
emanuel nacht
|