How to autologin?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iriu
    New Member
    • Aug 2007
    • 3

    #1

    How to autologin?

    If I have a login page, and i want to leave the others to access without writing username and password how to do it?

    There is a form and I can do it with input type hidden, but in "view source page" the others can see the username and password.

    How to implements it?
  • nathj
    Recognized Expert Contributor
    • May 2007
    • 937

    #2
    Originally posted by iriu
    If I have a login page, and i want to leave the others to access without writing username and password how to do it?

    There is a form and I can do it with input type hidden, but in "view source page" the others can see the username and password.

    How to implements it?
    If I were you I would take a look at the $_SESSION and $_COOKIE in php. These should help you.

    Have a look at this tutorial. I've never used it but it seems okay to me.

    Cheers
    nathj

    Comment

    • jx2
      New Member
      • Feb 2007
      • 228

      #3
      Originally posted by nathj
      If I were you I would take a look at the $_SESSION and $_COOKIE in php. These should help you.
      DONT USE COOKIE for that purose - cookies can be seen in internet files

      use session!!

      i hope tht helped
      jx2
      Last edited by jx2; Aug 2 '07, 12:21 PM. Reason: missing "[" in quotation

      Comment

      • nathj
        Recognized Expert Contributor
        • May 2007
        • 937

        #4
        Originally posted by jx2
        DONT USE COOKIE for that purose - cookies can be seen in internet files

        use session!!

        i hope tht helped
        jx2
        I personally agree and never use cookies, however, I thought I would present both options, for the sake of completeness

        nathj

        Comment

        • kovik
          Recognized Expert Top Contributor
          • Jun 2007
          • 1044

          #5
          Originally posted by jx2
          DONT USE COOKIE for that purose - cookies can be seen in internet files

          use session!!
          If he's actually after an auto-login (though the post sounds very confusing, so he may be after something else), then a session wouldn't work at all. A cookie would need to be used. Any auto-login (i.e. these forums) are done through a cookie, because sessions don't last indefinitely.

          Comment

          Working...