PDA

View Full Version : implement user login to my site




Howiieque
Oct 22, 2009, 10:55 PM
hi.

i plan to build a site and a client application as well. then the application can allow uses to login to the site. i have no experiences on this aspect. please give some suggestions that which class i should use.
i think i need to post the user name and password to the server to verify. but after that how can the server know the current user is valid. i need to deal with cookie or session state?
please give some comments.



Niiro13
Oct 22, 2009, 11:16 PM
Well, your server would use a script to take the username and search it through a database of users. Then check to make sure the password is correct if the user is found (if it isn't found then it'd send a reply back down saying it can't find the user).

Howiieque
Oct 23, 2009, 12:41 AM
after the uses have succeeded in login, they will do something like upload, post and modify their profile etc. i wonder that whether i need to validate them before such actions.

jeremy.king
Oct 23, 2009, 10:53 AM
after the uses have succeeded in login, they will do something like upload, post and modify their profile etc. i wonder that whether i need to validate them before such actions.

There are many strategies to handle user sessions, but the key is that you do check for a valid session before allowing any operations.