Cookies: PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PigBlimpin'
    Registered User
    • Sep 2003
    • 85

    #1

    Cookies: PHP

    What's the time() syntax to set a cookie to expire when the browser is closed?

    (is this even possible?)

    thx
    Pig Blimpin'... spendin' cheeze.
  • who
    So Fucking Banned
    • Aug 2003
    • 19593

    #2
    Originally posted by PigBlimpin'
    What's the time() syntax to set a cookie to expire when the browser is closed?

    (is this even possible?)

    thx
    not possible.

    Comment

    • PigBlimpin'
      Registered User
      • Sep 2003
      • 85

      #3
      Originally posted by .?.

      not possible.
      I'd have to do a session for that right?
      Pig Blimpin'... spendin' cheeze.

      Comment

      • Nathan
        Confirmed User
        • Jul 2003
        • 3108

        #4
        pb,

        if you want the cookie to expire then you have to NOT set any time!

        Thats all you need
        "Think about it a little more and you'll agree with me, because you're smart and I'm right."
        - Charlie Munger

        Comment

        • PigBlimpin'
          Registered User
          • Sep 2003
          • 85

          #5
          Originally posted by Nathan
          pb,

          if you want the cookie to expire then you have to NOT set any time!

          Thats all you need
          Sweet. So, the time() function is just an optional param. Not required. I'll try that. Thx!
          Pig Blimpin'... spendin' cheeze.

          Comment

          • who
            So Fucking Banned
            • Aug 2003
            • 19593

            #6
            Originally posted by Nathan
            pb,

            if you want the cookie to expire then you have to NOT set any time!

            Thats all you need
            Yes but he's asking how to do it using time parameter...

            Comment

            • PigBlimpin'
              Registered User
              • Sep 2003
              • 85

              #7
              Originally posted by .?.
              Yes but he's asking how to do it using time parameter...
              That works just fine. I just wanted the cookie to expire when the browser closed. I didn't realize that the time() function wasn't required, and could be omitted.

              ;)
              Pig Blimpin'... spendin' cheeze.

              Comment

              Working...