|
OK, people are asking SQL questions now so I'm not afraid to pick anyone's brains who's willing to help me (I've already tried usenet with no luck).
I have a lot of experience setting up web interfaces to relational databases but for the first time I have to set up something very much like the DU forum. I have to allow users to register with a login and password and save data to an "account". Eeeek, I have no idea how to do this! We're not storing credit card numbers or other personal info but still I'd like it to be as secure as possible since it seems like hackers flood our sites trying to break in nowdays. Our logs are filled with crazy stunts. Thank god I managed to get us out of IIS hell and into something sensible like Apache. Woah, that's a mightmare I'm glad is over.
Anyway, I know I store the login and password encrypted within the database. The user fills in a form, I check to see if there's already a user with the same name, if not I add a new record to the database keyed to the username and store the encrypted password. I'm fuzzy on the details but I imagine I can handle this.
But here's where I'm confused. How do you keep track of the session? In a stateless environment, how do I check that the user is authorized everytime they click something to view their data, edit it, browse it, etc.? I suppose you do it with cookies somehow? Is that relatively safe? Exactly what is the form of the cookie? Is it generated randomly, or what?
Any bulletin board specialists care to give me a bit of advice? Sorry for the selfish post but bosses are beginning to breathe down my neck and I'm desperate!
|