setcookie problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Phil Powell

    #1

    setcookie problem

    setcookie('nord icnet_registrat ion', $uplinenumber); // SESSION COOKIE TO BE
    SET

    I have this cookie I have to set that will be session-based (cookie deletes
    when browser session is closed, the classic). However, the cookie is set in
    /Main_page/registrering.ph p so the path for the cookie is incorrect; I want
    the path to be '/'. HOWEVER, PHP is strict on syntax so that if I set a
    path, I have to set a time int value at the same time.

    I want to set the path and NOT the time int. How do I do that?

    Phil


  • Pedro

    #2
    Re: setcookie problem

    Phil Powell wrote:
    [...][color=blue]
    >I want to set the path and NOT the time int. How do I do that?[/color]

    doesn't it work setting the time to 0? (not tested, hth)

    <?php
    setcookie('nord icnet_registrat ion', $uplinenumber, 0, '/');
    ?>


    --
    "Yes, I'm positive."
    "Are you sure?"
    "Help, somebody has stolen one of my electrons!"
    Two atoms are talking:

    Comment

    Working...