SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast imagenesis's Avatar
    Join Date
    Feb 2005
    Location
    Frederick, Maryland
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Cookie Deletion

    Here is my code:

    PHP Code:
    <?php
    session_start
    ();
    if(isset(
    $_COOKIE['friendId'])) {
    setcookie ("friendId",""time()-3600);
    }
    if (!isset(
    $_SESSION['fId'])) {
    header('Location: http://www.*********.com');
    }
    unset(
    $_SESSION['fId']);
    // kill session variables
    $_SESSION = array(); // reset session array
    session_destroy();   // destroy session.
    header('Location: http://www.*********.com');
    ?>
    When I get back to the myspacebunny.com I get a bunch of weird numbers as the friendId cookie value instead of having it be unset. What's wrong?
    Last edited by imagenesis; Jul 18, 2006 at 21:11.

  2. #2
    SitePoint Enthusiast imagenesis's Avatar
    Join Date
    Feb 2005
    Location
    Frederick, Maryland
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Weird.... Now it works...


Bookmarks

Posting Permissions

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