Exforsys
+ Reply to Thread
Results 1 to 3 of 3

ASP Login / Database Help.

This is a discussion on ASP Login / Database Help. within the ASP forums, part of the Programming Talk category; I am needing some help with a few asp pages and a login script. Let me start by describing my ...

  1. #1
    harris Guest

    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
    chris@mcmillans.com





  2. #2
    Robin Guest

    Re: ASP Login / Database Help.

    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" <harris@computekdirect.com> wrote in message
    news:Y6arc.23613$Wg6.16699@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
    > chris@mcmillans.com
    >
    >






  3. #3
    Captain Flack Guest

    Re: ASP Login / Database Help.

    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.



    --

    captain_flackTONYBLAIRFROMOFFICE@hotmail.com

    (remove Tony Blair from office to contact me)



    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...