Thread: Cookie Problem!

    #1
  1. No Profile Picture
    chinnavi
    Guest
    Devshed Newbie (0 - 499 posts)

    i need a help in Cookies ..

    I am using perl with CGI.pm

    i want to set a cookie in the client side using CGI.pm ..
    It is well and Fine working.
    The problem is i couldnt able to set different valuefor the same cookie after some
    pages displayed ...
    i used this code ...

    $CookieID = "$id+$password";

    $cookies = $query->cookie(-name=>'b',
    -value=>$CookieID
    );

    print $query->header(-cookie=>$cookies);

    Anyone please tell me what is the problem..


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

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    $CookieID = "$id+$password";
    $cookies = $query->cookie(-name=>'b',
    -value=>$CookieID
    );
    print $query->header(-cookie=>$cookies);

    -------------------
    -------------------

    Just try like following..

    $CookieID =$id."+".$password;
    # i don't what you are doing with this '+'

    #pass one more argument 'expires'.(ie, set an expiry time for your cookie)

    $cookies = $query->cookie(-name=>'b',
    -value=>'$CookieID',-expires=>'+1h');

    print $query->header(-cookie=>$cookies);

    ---------------
    ---------------


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

    "The fear of the LORD is the beginning of knowledge..."

IMN logo majestic logo threadwatch logo seochat tools logo