473,394 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Sessions how they are used.

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 rb****@comcast.net logs into the site I want
to be able to see rb****@comcast.net 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 =---
Nov 18 '05 #1
2 1386
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" <rb****@liquidhub-dot-com.no-spam.invalid> wrote in message
news:40********@127.0.0.1...
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 rb****@comcast.net logs into the site I want
to be able to see rb****@comcast.net 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

=---
Nov 18 '05 #2
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" <rb****@liquidhub-dot-com.no-spam.invalid> wrote in message
news:40********@127.0.0.1...
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 rb****@comcast.net logs into the site I want
to be able to see rb****@comcast.net 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

=---
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Theo | last post by:
Question for the group The authentication system for the site Im working on seems to function properly and all is good. A session keeps track of everything and a cookie is used to accept or deny...
1
by: windandwaves | last post by:
Hi Gurus I am basically sorry that I have to bother you about this. I am a PHP beginner and I have been studying sessions and cookies over the last few weeks. I have learned lots, but I am...
4
by: vesely | last post by:
Hi all, I'm currently relying on logged-in users hitting "logout" (logoff) before they leave, in order to terminate the session. With PHP the session filename is in a cookie that lasts for the...
10
by: Mark H | last post by:
Hey all-- I'm building a database and I basically need to keep out people who aren't authorized, but it's not like I need top security here. I'm just doing basic user/pass of a SQL database, and...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
13
by: Simon Dean | last post by:
And while Im at it... should I be using PHP's built in sessions, or use my own functions that I've chobbled together from various sources and takes advantage of also validating IP Addresses??? I...
1
by: Duncan | last post by:
I have a strange problem with sessions in PHP 5. I have a simple script that prints a random number both as a string and a picture on the screen. When I run the script for the first time, it works...
10
by: julian_m | last post by:
i'm finishing my 2nd php project. It's a sort of catalog and I used css/mysql as well. All the functionality of the site is mainly beacause the great number of arguments I pass to every page on...
3
by: jantox | last post by:
Good day, We have some Java programmers in our software dev, and they are pressuring us to use Sessions to store data and use that Session to get query data. They say that it is ok since it is...
3
Atli
by: Atli | last post by:
Introduction: Sessions are one of the simplest and more powerful tools in a web developers arsenal. This tool is invaluable in dynamic web page development and it is one of those things every...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.