Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Howiieque

macrumors regular
Original poster
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.
 
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).
 
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.