#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    1
    Rep Power
    0
    Suppose I have a script:

    <?php
    $new = "1234";
    setCookie("newcookie", $new, time() + 3600);
    echo ("$new");
    ?>

    And I then try to read it with:

    <?php
    $HTTP_COOKIE_VARS["newcookie"];
    echo ("$newcookie");
    ?>

    Why does this not work?

  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    try this..

    <?php
    $new = "1234";
    setCookie("newcookie", $new, time() + 3600);

    echo "cookie has been set!!n";
    echo $newcookie;
    ?>



    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    NYC, USA
    Posts
    17
    Rep Power
    0
    Actually there is no need to perform a $HTTP_COOKIE_VARS. Normal echo would be sufficient.

Similar Threads

  1. include external page that uses cookies
    By micahbdavis in forum PHP Development
    Replies: 1
    Last Post: February 9th, 2004, 05:03 PM
  2. Replies: 4
    Last Post: January 11th, 2004, 12:34 PM
  3. replication: distributing read operations
    By JunkCookie in forum MySQL Help
    Replies: 3
    Last Post: December 10th, 2003, 03:22 AM
  4. read linux file with php
    By gamers in forum PHP Development
    Replies: 1
    Last Post: December 6th, 2003, 08:57 AM
  5. cant delete cookies random errors
    By toxical in forum PHP Development
    Replies: 2
    Last Post: November 26th, 2003, 06:16 AM

IMN logo majestic logo threadwatch logo seochat tools logo