title: jQuery Remote validation
body: <p>I have a problem with jQuery remote validation. I am checking if email is registered, remote validation works, but it display only values - true or false and I cant submit the form than. </p>
  
  <p>jQuery code :</p>
  
  <pre><code>$("#form").validate({
    rules: {
      email: {
        required: true,
        email: true,
        remote: "check-email.php"
  
      }
    }
  }); 
  </code></pre>
  
  <p>check-mail.php code :</p>
  
  <pre><code>$email = trim(strtolower($_REQUEST['email']));
  
  
  $checkemail = mysql_query("SELECT * FROM users WHERE email = '".$email."'");  
  
  if(mysql_num_rows($checkemail) == 1)
  {
  $valid = 'false';
  }
  else
  {
  $valid = 'true';
  } //end of $checkemail if statemant
  
  
  echo json_encode($valid);
  </code></pre>