title: PHP browser does not delete cookies
body: <p>I'm making a log in system, however i want them to be able to log out of course, this had me occur a big problem, the cookie i set does not want to be removed no matter what i try, i've tried removing it many ways.</p>
  
  <p>--- Login.php</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Website&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="../css/style.css"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;header&gt;&lt;p&gt; Lost Story &lt;/p&gt;&lt;/header&gt;
      &lt;div id="nav"&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="../index.php"&gt;Home&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="register.php"&gt;Register&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="../downloads.html"&gt;Downloads&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="../forums.html"&gt;Forums&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="../donate.html"&gt;Donate&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="../vote.html"&gt;Vote&lt;/a&gt;&lt;/li&gt;
                  &lt;div id="right"&gt;
                  &lt;?php
                      if(isset($_COOKIE['LoggedIn']) &amp;&amp;   !empty($_COOKIE['LoggedIn'])) {
                      echo "&lt;li&gt;&lt;a href=\"logout.php\"&gt;Log Out&lt;/a&gt;&lt;/li&gt;";
                      } else {
                          echo "&lt;li&gt;&lt;a href=\"login.php\"&gt;Log in&lt;/a&gt;&lt;/li&gt;";
                      }
                  ?&gt;
                  &lt;/div&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;div id="content"&gt;
      &lt;?php
  
      echo var_dump($_COOKIE['LoggedIn']);
  
      if(isset($_COOKIE['LoggedIn']) &amp;&amp; !empty($_COOKIE['LoggedIn'])) {
          echo "&lt;label&gt; You are already logged in, you do not need to again. &lt;/label&gt;";
      } else {
          echo "&lt;div id=\"form\"&gt;
          &lt;form action=\"login.php\" method=\"POST\"&gt;
              &lt;label&gt;
              &lt;br&gt;Username:&lt;br&gt;
                  &lt;input type=\"text\" name=\"name\"&gt;
              &lt;/label&gt;
              &lt;label&gt;
              &lt;br&gt;Password:&lt;br&gt;
                  &lt;input type=\"password\" name=\"pass\"&gt;
          &lt;/label&gt;
          &lt;label&gt;
              &lt;br&gt;
                  &lt;input type=\"submit\" name=\"submit\"&gt;
          &lt;/label&gt;
          &lt;/form&gt; 
      &lt;/div&gt;";
      }
  
  $LoggedIn = false;
  
  ERROR_REPORTING(E_ALL);
  include_once('dbconnection.php');
  
  if($_SERVER['REQUEST_METHOD'] == "POST") {
  
  $user = htmlspecialchars($_POST['name']);
  $pass = htmlspecialchars($_POST['pass']);
  
  $once = false;
  
  if(!isset($user) || !isset($pass)) {    
      echo "&lt;p&gt; Please insert all the data &lt;/p&gt;";
  } else {
      $sql = "SELECT * FROM persons"; 
      $result = mysqli_query($mysqli, $sql);
  
      if(mysqli_num_rows($result) &gt; 0) {
          while($row = mysqli_fetch_assoc($result)) {
              if($row["username"] === $user &amp;&amp; $row["pass"] === md5($pass)) {
                  echo "&lt;br&gt;&lt;label&gt; Logged into " .$user . "&lt;/label&gt;";
                  $once = true;
                  $LoggedIn = true;
                  setcookie("LoggedIn", $LoggedIn == true ? $user : "", time() + (86400 * 30), "/");
  
              }
          }
          if($once == false ) {
              echo "&lt;br&gt;&lt;label&gt;No data found, please insert correct data&lt;/label&gt;";
                  $once = true;
              }
  
          $once = false;
      } else {
      echo "No results found";
      }   
  }
  }
  ?&gt;
  
      &lt;/div&gt;
      &lt;/div&gt;
    &lt;footer&gt; Website copyright etc &lt;/footer&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>And for my logout.php i had this</p>
  
  <pre><code>&lt;?php 
  
  if(isset($_COOKIE['LoggedIn']) &amp;&amp; !empty($_COOKIE['LoggedIn'])) {
      setcookie('LoggedIn', '', time()-3600, '/');
      header("Location: ../index.php");
  } else {
      echo "no";
  }
  ?&gt;
  </code></pre>
  
  <p>I'm not really sure why it does not want to remove the cookies, so i hope you can help me.</p>