Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts

    the best way to store a value

    what is the best way to store a value e.g. A255Ftn944 to be accessed by a website while the user is browsing the site. the value is obtained from a database during the logon phase.
    what are the pros and cons of using:
    a)cookies
    b)form in a frame
    c)session variable

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It all depends on what you are trying to do... this is always my first question (unless that has been stated already):

    What are you trying to accomplish?

    That should ALWAYS be the first thing you explain when asking for help, as well. Don't explain what you're trying to accomplish with code, rather explain what you are trying to accomplish with words, instead - since oftentimes people are not even on the right path regarding what they are trying to do.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i would like to store the value for authentification purposes so a script checks to see if it is a vaild value and lets the user access the page.

    the user will login on the site and the value should be accessable while they browse and unacessable when they have left the site.

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you don't want to rely on cookies, your only option is really a database (or at the very least a text file on the server), since a session variables in classic ASP rely on cookies.

    Of course, you can always let your users know "cookies must be enabled to access the features of the site", etc.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i have my user details in a database, but you see the thing is i need to check wther a user is logged in, when they login i store a variable(thats why i`m interested to know which ways best) and i then check the variable to see if it matches the database if it does it displays the page.

    do you see where i`m coming from?

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    41 8' 52" N -95 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think you already answered your own question? Since HTTP is stateless you either have to rely on cookies or a database.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

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