If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Retrieving a data field from a database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-24-05, 12:55
JJ7AS JJ7AS is offline
Registered User
 
Join Date: Jan 2005
Posts: 9
Retrieving a data field from a database

Hi guys, right, im using asp connected to access db. When im on my login page in my browser and i click submit i would like on the next page for it to say Welcome 'Customer Name', how would i go about doing this? And where abouts are the scripts implemented? Any help would be great im new to this.



Regards
Reply With Quote
  #2 (permalink)  
Old 02-27-05, 00:06
MrWizard MrWizard is offline
Registered User
 
Join Date: Mar 2003
Location: Atlanta, GA
Posts: 191
You'll need to create the 2nd page as an asp page. The Login page form should specify the 2nd page as the action for the form.

In the asp on the 2nd page, you need to retrieve the login name passed using the Request object. Use that to do a check against your DB. If access is allowed, then just display the Welcome.

The ASP scripts run on your web server.

Tim
__________________
Tim

Last edited by MrWizard; 02-27-05 at 00:09.
Reply With Quote
  #3 (permalink)  
Old 02-28-05, 02:02
richy240 richy240 is offline
Registered User
 
Join Date: Sep 2003
Posts: 24
You could also store the user's name in a Session variable, though this is not recommended by some developers because of the tremendous traffic some sites get (the Session variable won't be deleted from the system until the Session times out which could lead to a large drop in system resources). My site gets limited traffic, so I'm not worried.

I store the user's login name and a few other details in Session variables (and a Cookie too). Then I don't have to check the DB every time they open a new page - I can either check the Session variables or the cookie.
Reply With Quote
  #4 (permalink)  
Old 03-02-05, 19:23
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
And perhaps this may hopefully give you some ideas:

Classic ASP Design Tips - Login Page
http://www.bullschmidt.com/devtip-loginpage.asp
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
Pingbacks are On
Refbacks are On