Sessions how they are used.


R

rboyle

Quick question on sessions.

I have a login page that is authenticating users against a SQL
Database (within a table that contains a username and a
password...along with other information about the user).

I want to be able to track who is logged into the site (becasue there
are certain pages which need to be related with the user who is
signed in.)

For example there is a section for the users email...and there is a
collumn in the database for email.

If rboyle, who's email is (e-mail address removed) logs into the site I want
to be able to see (e-mail address removed) as his email account.

If anyone has example code for this that would be great.

Regards
Ryan J. Boyle
 
Ad

Advertisements

B

Bruno Sirianni

When user log in you can set a session variable with user or directy with
mail.
When this user go to mail page you can use this variable for view user mail
..

[c#]
login :
if (autenticate == true)
Session["userID"] = .....;

mail page :
string mail = ExecQueryMailFromUser(Session["userID"] as string);

Brun

rboyle said:
Quick question on sessions.

I have a login page that is authenticating users against a SQL
Database (within a table that contains a username and a
password...along with other information about the user).

I want to be able to track who is logged into the site (becasue there
are certain pages which need to be related with the user who is
signed in.)

For example there is a section for the users email...and there is a
collumn in the database for email.

If rboyle, who's email is (e-mail address removed) logs into the site I want
to be able to see (e-mail address removed) as his email account.

If anyone has example code for this that would be great.

Regards
Ryan J. Boyle



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top