PDA

View Full Version : only one user with one login


usban
09-17-2002, 11:37 PM
I am building an aplication for a lot of users. Every user will have a password and a login. I also use session in order that if the user is not registered he can't visit any page. The problem is that i can visit the page simultaneously with different computers using the same login and pass.

I've thought of using a table in which i store the on-line users in order to check it before leting a use enter the page, but the problem is that if the user close the browser without closing the session he will not be able to enter again because his id will appear on this table.
I've thought of using cookies but i don't know how because i don't know anything about them.

Thank you.:confused:

Dylan Leblanc
09-17-2002, 11:43 PM
You could check IP numbers to make sure a user does not have two different IP numbers at the same time.

usban
09-17-2002, 11:53 PM
Well, but i can't link an Ip number to a user because the IP number is different every time you connect and also if you have permanent conection to Internet, i don't want that the users will only be able to enter the page from an specific computer.

If i use the table with the Ip number i will have the same problem that i have explained in the first post.

Dylan Leblanc
09-18-2002, 12:01 AM
Whenever they log-in, update their IP number in the database, and if another log-in for tthem is attempted within say an hour, and it has a different IP, then dont let that one in.

Actually, that is not the ideal way to do this.

Use cookies.