title: Cookie is set only when checkbox is checked, but not when it's unchecked
body: <p>My current login script I made with PHP Is working, But when i try to login and uncheck "Remember me" It logs in, But does not set the required cookies, However, If i check the Remember box, It logs in and sets the cookies.
  So the issue is, What causes it to happend?
  My PHP CODE: </p>
  
  <pre><code>&lt;?php
      /* Mysql data */
      $MysqlUsername = "root";
      $MysqlPassword = "";
      $MysqlHostname = "localhost";
      $MysqlDatabase = "teamgamersnet";
      $Salt = "TGN2012";
      $Username = $_POST['Username'];
      $Password = $_POST['Password'];
      $Remember = $_POST['Remember'];
      $Cookie = "TGN";
      $IP       = $_SERVER['REMOTE_ADDR'];
      if (empty($Username) || empty($Password)) { die("Please fill in all the fields"); }
  
  
      $hash = hash('sha256',strtolower($Username).$Password.$Salt);
  
      $Sql = new mysqli($MysqlHostname, $MysqlUsername, $MysqlPassword, $MysqlDatabase);
      if ($Sql-&gt;connect_error){ echo $Sql-&gt;connect_error; }
      $sUser = $Sql-&gt;real_escape_string($Username);
      $sPass = $Sql-&gt;real_escape_string($Password);
      $xPass = $Sql-&gt;real_escape_string($hash);
  
  
      $CheckUser = $Sql-&gt;query("SELECT * FROM `users` WHERE `Username` = '".$sUser."'");;
      if ($CheckUser-&gt;num_rows == 0) { header("Location: /?p=Login&amp;wrongusr=true"); die(); }
      $xCheckUser = $CheckUser-&gt;fetch_array(MYSQLI_ASSOC);
      if ($xCheckUser['Activated'] == "false") { header("Location: /?p=Login&amp;activate=true"); die(); }
      if(strtolower($Username) == strtolower($xCheckUser['Username'])) {
          if($hash == $xCheckUser['Password']) { // Check if password is correct
          if(isset($Remember)){ // Set a looong cooke to remember
                  setcookie ($Cookie."User", htmlspecialchars($Username), time() + 99999999);
                  setcookie ($Cookie."Pass", $hash, time() + 99999999);
                          header("Location: /?login=true");
  
          }
          else
          { // Set a standard cookie
                  setcookie ($Cookie."User", htmlspecialchars($Username), time() + 3600);
                  setcookie ($Cookie."Pass", $hash, time() + 3600);
                  header("Location: /?login=true");
          }
  
      }
  
      else
      {
          header("Location: /?p=Login&amp;wrongpwd=true"); // Send them to home page 
      }
      }
  ?&gt;
  </code></pre>