Public Variables

Results 1 to 3 of 3

Thread: Public Variables

  1. #1
    B. Charter Guest

    Default Public Variables

    I don't want to use the session object cuz i don't wanna tax my server, but i'm wondering, what's the best way to make sure a user is authenticated b4 loading the pages. maybe a global variable? or would a session object be the best bet?

  2. #2
    Join Date
    Dec 1969

    Default RE: Public Variables

    So your going to use a global variable?...mmmmm...I think not.<BR><BR>The stigma that goes with session variables is unfounded in certain circumstances:<BR><BR>The rules are:<BR>Don&#039;t abuse them<BR>AND<BR>Don&#039;t store objects in them<BR><BR>If you are storing a couple of bytes per sessionhow are you going to crash your server.<BR><BR>Just think about these things a little or test them first.

  3. #3
    Join Date
    Dec 1969

    Default RE: Public Variables

    session variables are fine if you are only storing a few bytes in them, and you are *not* storing objects (esp db connection objs). the only problem that may arise is the issue of web farms, and to my knowledge, if the &#039;process&#039; spans more than one server, this session data would be lost. (i would be gratefull if someone could update me on this). to get round this, you could either store user info in a database, but think of all that extra overhead, or, pass user info from page to page.

Posting Permissions

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