Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 11-25-2004, 01:55 PM Greet logged in user
netcrawler's Avatar
Average Talker

Posts: 27
Location: QC, Canada
Trades: 0
What is the easiest way to have the name of the logged on user appear on the logged in page? I have a database with the following fields:

Name
UserName
Password

The page is password protected so as soon they log on they have access to that page I want the NAme that corresponds to that user name to appear on the top of the page like this: ie:

Welcome <Name>

Thanks.
netcrawler is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-25-2004, 09:29 PM
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
While login, set a cookie for the user.
Encrpyt the cookie so that you only can view it.

Search for some ASP Encrypt scripts in google.
RC4 Encryption Using ASP & VBScript

Use the cookie value to display the name.

Caution: Do not save too much sensitive data on the cookie.

If the users' browser do not support cookies, you can use session variables.
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Old 11-28-2004, 01:15 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
he net,

On the login page you can use two things.

1. You can set a cookie with the users Username iin it.
<%
dim strEmail

Response.Cookies("MyCookie")("username")="ACJavasc ript";
Response.Cookies("MyCookie").Expires = Date +1; 'one day
strUsername=Request.Cookies("MyCookie")("username" );
%>
Welcome <%=strUsername%>

2. You can use a session variable.
<%
'really basic look
Session("MySession")="ACJavascript"
%>
Welcome <%=Session("MySession")%>

Good luck!
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development

Last edited by ACJavascript; 11-28-2004 at 01:25 PM..
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Reply     « Reply to Greet logged in user
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12353 seconds with 12 queries