creating a secure login

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Rockape
Forum Newbie
Posts: 1
Joined: Fri Sep 18, 2009 1:49 pm

creating a secure login

Post by Rockape »

Hi all,

I'm trying to create a login script where the website will not allow the same user to login twice from different computers.

I have thoght of using sessions but have no clue how to go about it. Grateful for some advice.

thanks :banghead:
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: creating a secure login

Post by pickle »

When a user logs in, generate a session ID for the user, and store it in the database along with their username.

Whenever a user tries to login, check if a session ID exists for the username they entered. If it does, deny them entry.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: creating a secure login

Post by greyhoundcode »

By the by, are you a Regt Gnr?
hollywoods
Forum Newbie
Posts: 1
Joined: Tue Oct 27, 2009 12:59 pm

Re: creating a secure login

Post by hollywoods »

Thanks pickle, I will use it too. :bow:
Post Reply