#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    70
    Rep Power
    15
    hi,

    the problem: i set a cookie with data in it. then I take the browser through a series of pages and then at one point i need to update the cookie.

    solution:?

    Raaj
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Alkmaar, The Netherlands
    Posts
    123
    Rep Power
    15
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>solution:?[/quote]

    Just set another cookie with the same name.

    For example:

    Your first cookie is set with:

    setcookie ("TestCookie", "Test Value");

    If you want to update cookie use:


    setcookie ("TestCookie", "Updated Value");

    Now the previous cookie gets overwritten. by the new cookie.

    ------------------
    Good luck,
    Bas

    ------------------
    E-mail me at: b.vandermeijden@pecoma.nl
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    70
    Rep Power
    15
    thanks
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    70
    Rep Power
    15
    hi MeijdenB,

    situation again: i am sending some data through variables through a form ( hidden type variable) while calling the next page I read the data and I want to assign it to a cookie.

    result: it is not working.

    raaj
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Malaysia
    Posts
    13
    Rep Power
    0
    i would appreciate if u could paste in the portion of code u r currently working with, not just descriptions of what u r trying 2 do. however after reading ur qns, i think here's how it could be done:

    setcookie("CookieName", $hiddenvarname, time()+86400 /* this is the expiry time in seconds*/);

Similar Threads

  1. cant delete cookies random errors
    By toxical in forum PHP Development
    Replies: 2
    Last Post: November 26th, 2003, 05:16 AM
  2. Clearing all cookies php script - HowTo?
    By fordfasterr in forum PHP Development
    Replies: 8
    Last Post: October 24th, 2003, 09:40 AM
  3. Problem with lwp and cookies
    By vinaykakade in forum Perl Programming
    Replies: 1
    Last Post: August 13th, 2003, 10:07 AM
  4. Problems setting cookies with a path and domain
    By IBBoard in forum PHP Development
    Replies: 4
    Last Post: July 2nd, 2003, 03:03 PM
  5. AOL cookies?
    By cfthong in forum PHP Development
    Replies: 0
    Last Post: August 18th, 2000, 10:59 AM

IMN logo majestic logo threadwatch logo seochat tools logo