Whats the difference between a session and a cookie?

Discussion in 'PHP' started by Jen-, Sep 5, 2007.

  1. #1
    Hello, whats the difference between a session or a cookie? Please let me know, thanks very much.
     
    Jen-, Sep 5, 2007 IP
  2. rcj662

    rcj662 Guest

    Messages:
    4,403
    Likes Received:
    97
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Cookie keeps track of you and session is when you went to site. Cookies are used for tracking refferals or how often you go to site.
     
    rcj662, Sep 5, 2007 IP
  3. bibel

    bibel Active Member

    Messages:
    289
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
  4. Philopoemen

    Philopoemen Peon

    Messages:
    704
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sessions are bits of information that are kept on the server, and are destroyed once the visitor closes the browser. They are useful for storing temporary visit information, like username, ID, time, etc.

    Cookies are kept on the visitor's hard-drive (if enabled in the browser). Thus the information kept in cookies can be viewed by a third-party.

    http://www.php.net
     
    Philopoemen, Sep 6, 2007 IP
  5. tamilsoft

    tamilsoft Banned

    Messages:
    1,155
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Simply:
    Cookie - Managed on the client's machine[ie the visitor's pc]

    Session- Managed on the server
     
    tamilsoft, Sep 7, 2007 IP