log in page

Results 1 to 3 of 3

Thread: log in page

  1. #1
    Join Date
    Dec 1969

    Default log in page

    I want to create the login page which matches the input from a database table and accepts it if the name and password exist in db...I want to use session variable to allow user access to the db so that people cannot go directly to a page if they know the hyperlink rather they always need to enter password. While login is entered for the first time and after that it remembers the login....<BR>I am new to this and any help will be great...<BR>tahnks

  2. #2
    Lurker Guest

    Default RE: log in page

    1) Retrieve the values from the login form using a POST<BR>2) Query the database to see if there is a record matching the username/password entered. If there is set Session("LoggedIn") to true otherwise set it to false.<BR>3) At the top of each page put in this code<BR> &#060;% If not(Session("LoggedIn")) then response.redirect "Login.Asp"

  3. #3
    gzazJim Guest

    Default RE: log in page

    Howdy Sam,<BR><BR>Just include the following lines at the top of the pages that you want to be password-protected:<BR><BR>&#060;%@Language=VBScript%&#062; <BR>&#060;%<BR><BR>If session("ValidUser") = "" OR session("ValidUser") = "False" Then<BR> Response.Redirect "YourLoginPage.asp"<BR>End IF<BR><BR>%&#062;<BR><BR>Regards,<BR><BR>Jim<BR><B R>P.S. Remember, session variables can eventually cause you problems, so I&#039;d suggest using cookies.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts