ASP: getting other infor fron User Table during login

liunx

Guest
I have a login area on the top section of a site Im developing. It has a email (being used as the username), password and remember me fields.

Once logged in the username and access level are stored as cookies. Since the site is multi-lingual I want to get the info from the "Native Language" field in the user table and store that as a cookie also when the user logs in. Also since the login in on every page I want the user to be brought back to the page they logged in on. Eg. If they login on the homepage it should reload after login, as it would on the product page or FAQ page.

so basically it would go like this:
1. user logs in
2. logininfo is validated against DB
3. if user is registered get the native language and access level from the DB
4. write emai, access level and language to cookies.
5. reload the current page

How would I go about that. Im using ASP/VB/SQL

Ive managed to build a pretty robust site that works really well but there are a few little things like this that are just escaping me. Ive done similiar things in the past but I just cannot come up with the right code now. Must be the 10 weeks Ive spent on the site :(

Thanks so much.4 is wrong!!!! never store anything that can be used against the site at a later date. it would allow anyone to spoof the cookie and break into your site.


i would just store a uniqueidentifier in the cookie. if you can guess the right one then go ahead edit my site. 1 change in 32 billion years ... LOL.Also, you open your customers up to security risks by placing their email in a cookie.

There is no telling where they are accessing your site from.

If they're at a Web Cafe or library or something similar anyone could be sitting down at that computer next.

Personally, I prefer sites that remember my username, but not my password. I prefer to know that I actually have to do something to log in rather than just the person who sits down at my computer. (and, yes, I know....we don't do that here :P)
 
Back
Top