468,507 Members | 1,602 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,507 developers. It's quick & easy.

ASP Login / Database Help.

I am needing some help with a few asp pages and a login script.

Let me start by describing my project.

I am trying to connect to a database and verify a users login and password,
then based on that login information display 3 pages based on their login.

On the home page if they are NOT logged in, I need it to display the login
box, if they ARE logged in I want it to display Welcome Customer Name from a
database called vcust.dbf which contains both the username and password
fields.

The two other pages will be based on the username (which is actually my
customers customer number ... example '100001'). I am needing to display
the customers account informaiton on one page from the vcust.dbf and their
rental history on another page from records.dbf.

To get a better idea of what I need, you can visit my site at
http://www.mcmillans.com and view the home page, the My Account page and the
Rental History page.

I am on a non-existant budget and am hoping to find someone who has some
extra time and willing to donate an hour or two to help me with this. If so
you are welcome to use my site on your resume or references.

Thanks!

Chris

PS. Please email me if you have questions or can help me out at
ch***@mcmillans.com
Jul 19 '05 #1
2 1795
Use session variables. I'm guessing you have a userID or loginID table in
your database. when they log in it should verify the form fields with the
database table login id and password. Set a session variable to be their ID
(i.e. customer #, assuming it's unique):
for example, session(cusID) = tableName("customerNumberFieldName")
So on the home page you would have something like:
If session(cusID) <> "" Then
' write out page here with account info from vCust.dbf, rental history, etc
else response.write "Enter Login ID: <input type='text' name='loginID'>
Password: <input type='text' name='password'>"
End If

Hope this helps!

"harris" <ha****@computekdirect.com> wrote in message
news:Y6*******************@bignews5.bellsouth.net. ..
I am needing some help with a few asp pages and a login script.

Let me start by describing my project.

I am trying to connect to a database and verify a users login and password, then based on that login information display 3 pages based on their login.

On the home page if they are NOT logged in, I need it to display the login
box, if they ARE logged in I want it to display Welcome Customer Name from a database called vcust.dbf which contains both the username and password
fields.

The two other pages will be based on the username (which is actually my
customers customer number ... example '100001'). I am needing to display
the customers account informaiton on one page from the vcust.dbf and their
rental history on another page from records.dbf.

To get a better idea of what I need, you can visit my site at
http://www.mcmillans.com and view the home page, the My Account page and the Rental History page.

I am on a non-existant budget and am hoping to find someone who has some
extra time and willing to donate an hour or two to help me with this. If so you are welcome to use my site on your resume or references.

Thanks!

Chris

PS. Please email me if you have questions or can help me out at
ch***@mcmillans.com

Jul 19 '05 #2
Robin wrote:
Use session variables. I'm guessing you have a userID or loginID table in
your database. when they log in it should verify the form fields with the
database table login id and password. Set a session variable to be their ID
(i.e. customer #, assuming it's unique):
for example, session(cusID) = tableName("customerNumberFieldName")
So on the home page you would have something like:
If session(cusID) <> "" Then
' write out page here with account info from vCust.dbf, rental history, etc
else response.write "Enter Login ID: <input type='text' name='loginID'>
Password: <input type='text' name='password'>"
End If


Personally I'd suggest using cookies. Session variables hog server
memory and need to be timed out to stop the server running out of memory.

I often get frustrated when I have several things on the go and a site
times my login out for inactivity. If you use cookies to store the
userid and password and check this on each page, the user can leave a
browser inactive for hours (or days) and still not be timed out.

--

ca******************************@hotmail.com

(remove Tony Blair from office to contact me)
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Wayne Smith | last post: by
12 posts views Thread by Michael | last post: by
10 posts views Thread by Pete | last post: by
1 post views Thread by xcelmind | last post: by
9 posts views Thread by Ben | last post: by
4 posts views Thread by Brett | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.