title: php die() doesn't work (simply code)
body: <p>I am learning how to use "setcookie", however, I couldn't get following line to work, 
  I have pasted all my codes here, if someone could give me a hand please?
  Have no idea the reason.
  Many thanks.</p>
  
  <pre><code>  else{ die ("hahahahahahahahahahahahahaha"); }
  </code></pre>
  
  <p>HTML code</p>
  
  <pre><code>&lt;form method="POST" action=""&gt;
  &lt;div class="error"&gt;&lt;?php echo $error;?&gt;&lt;/div&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;label&gt;Username: &lt;/label&gt;&lt;br&gt;
  &lt;input type="text" name="username"&gt;&lt;br&gt;
  &lt;label&gt;Password: &lt;/label&gt;&lt;br&gt;
  &lt;input type="password" name="password"&gt;&lt;br&gt;
  &lt;input type="checkbox" name="rememberme"&gt; Remember me&lt;br&gt;
  &lt;input type="submit" name="submit" value="Login"&gt;
  </code></pre>
  
  <p>PHP CODE</p>
  
  <pre><code>&lt;?
  if(isset($_POST['submit'])){
      //get data
      $username = $_POST['username'];
      $password = $_POST['password'];
      $rememberme = isset($_POST['rememberme']);
      echo $rememberme;
  
  
      if($username&amp;&amp;$password){
      $login = mysql_query("SELECT * FROM form WHERE username='$username'");
  
      while ($row = mysql_fetch_assoc($login))
      {
          $db_password = $row['password'];
          if (md5($password)== $db_password)
          {
              $logstatus = TRUE;
              }
          else{
              $logstatus = FALSE; 
              }
          if ($logstatus == TRUE)
          {
              if ($rememberme == "1")
                  setcookie("username", $username, time()+600);
              else if ($rememberme == "")
                  $_SESSION['username'] = $username;
  
  
          echo " I am here";
          }
  
          else{
             die ("hahahahahahahahahahahahahaha"); //unable to get here
          }
      }
  
  }
  
      else{
      echo "enter username / password";
      }
  }
  ?&gt;
  </code></pre>