ah fucking php, this setcookie shit isn't working...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • galleryseek
    Confirmed User
    • Mar 2002
    • 8234

    #1

    ah fucking php, this setcookie shit isn't working...

    <?
    setcookie("username", "chris");
    ?>

    obviously the EASIEST form to use setcookie in.. .and it isn't setting the cookie. i'm no experienced coder by far, but what the fuck? i must be missing something here.

    n' no i dont have cookies turned off.

    i'm sure it is something im doing that is extremely stupid, and i'll admit my ignorance if i am doin somethin stupid..

    help?
  • galleryseek
    Confirmed User
    • Mar 2002
    • 8234

    #2
    it is BEFORE any HTML...

    and other cookies from other sites are coming through, n' this shit still isn't working.

    Comment

    • sacX
      Confirmed User
      • Dec 2002
      • 2998

      #3
      I use this and it works fine..perhaps you have to set an expiry ?


      $time = time();
      setcookie ("cookie_data",$cookie_string, $time+604800000);
      Have Asian Language Traffic?

      Comment

      • galleryseek
        Confirmed User
        • Mar 2002
        • 8234

        #4
        Originally posted by sacX
        I use this and it works fine..perhaps you have to set an expiry ?


        $time = time();
        setcookie ("cookie_data",$cookie_string, $time+604800000);
        yeah that worked.. but what is fucked up is i used that same exact coding.. but at that time, the coding was after some html so it didn't work..


        thx ;)

        Comment

        • sacX
          Confirmed User
          • Dec 2002
          • 2998

          #5
          Originally posted by galleryseek

          yeah that worked.. but what is fucked up is i used that same exact coding.. but at that time, the coding was after some html so it didn't work..
          thx ;)
          Have Asian Language Traffic?

          Comment

          Working...