title: Parse error: syntax error, unexpected (T_VARIABLE)
body: <p>I got an error while creating a live-check on password on my page.</p>
  
  <p>this is my js</p>
  
  <pre><code>$(document).ready(function()
  {
  var password;
  var repassword;
  $('#password').keyup(function (f)
  {
      $(this).val($(this).val().replace(/\s/g, ''));
  
      password = $(this).val();
  
      if(password.length &lt; 5)
      {
          $("#password-result").html('');
          return;
      }
  
      if(password.length &gt;= 5){
          $("#password-result").html('&lt;img src="images/available.png" /&gt;');
      }
  });
  
  $('#repassword').keyup(function (g)
  {
      $(this).val($(this).val().replace(/\s/g, ''));
  
      repassword = $(this).val();
  
      if(repassword.length &lt; 5)
      {
          $("#repassword-result").html('');
          return;
      }
  
      if(repassword.length &gt;= 5){
          $("#repassword-result").html('&lt;img src="ajax-loader.gif" /&gt;');
          $.post('check.php',{
              'password':password,
              'repassword':repassword
          },
              function(data){
                  $("#repassword-result").html(data);
              });
      }
  });
  });
  </code></pre>
  
  <p>If there is a way to simplify that then I would appreciate any help :)</p>
  
  <p>And this is my php</p>
  
  <pre><code>if(isset($_POST["repassword"])){
  $password = $_POST["password"];
  $repassword = $_POST["repassword"];
  
  if($password == $repassword){
      die $password;
  }
  else{
      die $repassword;
  }}
  </code></pre>
  
  <p>I don't know why i got an error is this part</p>
  
  <pre><code>    die $password;
  </code></pre>
  
  <p>it says Parse error: syntax error, unexpected '$password' (T_VARIABLE) in C:\xampp\htdocs\ secret \check.php on line 7</p>