Results 1 to 12 of 12

Thread: delete cookies [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Posts
    74

    delete cookies [RESOLVED]

    hello,
    I have 3 pages that deals with cookies:

    addcookies.php
    <?
    $i=0;
    $prod=$_COOKIE['prod'];
    while (list ($name, $value) = each ($prod))
    $i++;

    $prod=$_GET['prod'];
    setcookie("prod[$i]",$prod);
    ?>

    delcookies.php
    <?
    $prod=$_COOKIE['prod'];
    while (list ($name, $value) = each ($prod))
    setcookie("prod[$name]","");
    ?>

    showcookies.php
    <?
    $prod=$_COOKIE['prod'];
    while (list ($name, $value) = each ($prod))
    echo "$name == $value<br>\n";
    ?>

    this cookies are holding array as values
    I am keep failing to delete all the array there is always one cell in the array that is left...

    anybody see something wrong in this code?

    if you cant help me base only on this code then tomorrow I will upload it to my server and you will see what I mean...
    Yair
    Last edited by yair24; Sep 8th, 2003 at 01:13 AM.
    -------------------------------------
    http://www.ybweb.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width