Home : General : Internet Technologies :

General: Internet Technologies: Re: [Andy] lot of people cant loginto my site that uses cookies: Edit Log

Here is the list of edits for this post
Re: [Andy] lot of people cant loginto my site that uses cookies
just had another dude email me saying he cant login, he has

Browser: Internet Explorer
Browser Version: 6.0
Operating System: Windows 98

He says he has enabled cookies but still cant login.

Well this is how the login script works. The person puts his username and password in the boxes and clicks login, the script compares these details against whats in the database and if not correct it will put in red writing that either the username or pass is incorrect and to try again.
If its correct, then a session id is randomly generated and inserted into the session table in the mysql database along with the members ID and the session expiry time and a cookie is set with the data of the session id. People that cant login, i will find many sessions with their ID in it, so it inserts it into the database ok but the cookie seems to return wrong value. Then it goes to the page after login where the first thing the script does is check for valid user. It reads the cookie and gets the session id from it and sees if there is one in the database the same, is theres not then it returns to the login screen with no errors, if there is a match in the database then it will proceed to the next screen.
This is the problem that people are having, it will verify the password and user as correct, try and set the cookie and when it reads the cookie and compares the result to the database session entry it will not match as the cookie seems to return nothing and returns them to the login screen.

Last edited by:

WoSkI: Feb 20, 2003, 5:30 PM

Edit Log: