Login Design Issue.

Posted on 2004-11-12
Last Modified: 2010-04-15
Hi folks,

I am working on a database autentication with SQL server. I am wondering there are quite a few people turning there cookies off.
What would be the best approach to setup a login page from a professional point of view and why?

Question by:mathieu_cupryk
    LVL 1

    Expert Comment

    hey mathieu,

    I've just recently had to do this ASP.NET

    They way i went about was to create a database table called SessionIDs (for storing a SessionID, UserID & IsActive) and a table called Users (for storing userid, username, password)

    From that you can setup a login page with the following logic.
    if (SessionVariable set) && (is valid session)
      // draw Logged in page
    else if (SessionVariable set) && (is expired session)
     // draw Login Again Page
    else if (post details sent) && (invalid login)
     // draw Login Again Page
    else if (post details sent) && (valid login)
     // draw LoggedInPage & Set Session Variables SessionID + Active = 1 in the database.
    else (not post details sent)
     // draw default login page

    You can make the setup more complex by adding a timestamp for "lastChecked" to the sessionid table so everytime you revalidate it you can check to see if the page has been sitting idle for X number of minutes...

    As for the cookie point of view... well theres not alot you can do to force people to use cookies... Perhaps theres a way to check the Internet Browsers Use_Cookie_Status and popup a message advising them to turn on cookies for your site.

    Author Comment

    I see exactly what you mean and this is a very good approach. But I cannot see a clear picture. Do you have your site up?

    LVL 1

    Accepted Solution

    Unfortunately not in a publically viewable location, the project I worked on was for a Company Intranet.

    I have a logic layout document on my other PC tho for the login system, and I'll put that document in a publically viewable place later tonight and post the URL.


    Author Comment

    Sure just email me at I would love to see it.

    Author Comment

    Points increased.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now