title: google chrome with jquery and php login damaged
body: <p>i have problem with jquery working in chrome . 
  i have a code ( login code ) it works correctly in mozilla firefox but in chrome the output is "1" ;</p>
  
  <p>here is all codes - the php part</p>
  
  <pre><code>&lt;?php
  session_start();
  define('toDay',date('Y-m-d H:i'));
  define('lib','lib/');
  include lib.'config.php';
  include lib.'db.php';
  
  if(isset($_POST['email'])){
  if(!empty($_POST['email']) &amp;&amp; !empty($_POST['pass'])){
      $email = $_POST['email'];
      $pass = $_POST['pass'];
      $sql = $db-&gt;query("SELECT * FROM user WHERE email='$email' and       pass='$pass' limit 1");
      if( $u = $db-&gt;fetch($sql)){
          if($u['sath']=="modir"){
          $_SESSION['admin'] = true;
          $_SESSION['id']    = $u['id'];
          $_SESSION['time']  = time();
          $_SESSION['name']  = $u['name'];
          echo 1;}
          else{
          $_SESSION['user'] = true;
          $_SESSION['id']    = $u['id'];
          $_SESSION['time']  = time();
          $_SESSION['name']  = $u['name'];    
          echo 1;
          }
  
      }else{
      echo "رمز عبور یا ایمیل اشتباه می باشد .";  
      }
  }
  else {
      echo "لطفا جاهای خالی را پر کنید";
  }
  die();
  }
  
  ?&gt;
  &lt;!doctype html&gt;
  </code></pre>
  
  <p>the html part and jquery</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf8"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /&gt;
  &lt;!-- Apple devices fullscreen --&gt;
  &lt;meta name="apple-mobile-web-app-capable" content="yes" /&gt;
  &lt;!-- Apple devices fullscreen --&gt;
  &lt;meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" /&gt;
  
  
  &lt;!-- Bootstrap --&gt;
  &lt;link rel="stylesheet" href="css/bootstrap.min.css"&gt;
  &lt;!-- Bootstrap responsive --&gt;
  &lt;link rel="stylesheet" href="css/bootstrap-responsive.min.css"&gt;
  &lt;!-- Theme CSS --&gt;
  &lt;link rel="stylesheet" href="css/style.css"&gt;
  &lt;!-- Color CSS --&gt;
  &lt;link rel="stylesheet" href="css/themes.css"&gt;
  
  
  &lt;!-- jQuery --&gt;
  &lt;script src="js/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/migration.js"&gt;&lt;/script&gt;
  &lt;!-- Bootstrap --&gt;
  &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/eakroko.js"&gt;&lt;/script&gt;
  
  &lt;!-- Favicon --&gt;
  &lt;link rel="shortcut icon" href="img/favicon.ico" /&gt;
  &lt;!-- Apple devices Homescreen icon --&gt;
  &lt;link rel="apple-touch-icon-precomposed" href="img/apple-touch-icon-precomposed.png" /&gt;
  &lt;script&gt;
  
  &lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body class='login'&gt;
  &lt;div class="wrapper"&gt;
      &lt;h1&gt;&lt;a href="index.html"&gt;&lt;img src="img/logo-big.png" alt="" class='retina-ready' width="59" height="49"&gt;تحلیلگران امین&lt;/a&gt;&lt;/h1&gt;
      &lt;div class="login-body"&gt;
          &lt;h2&gt;ورود کاربر&lt;/h2&gt;
          &lt;form id="login-form" method="post"&gt;
              &lt;div class="email"&gt;
                  &lt;input type="text" name='uemail' id="uemail" placeholder="آدرس ایمیل" class='input-block-level'&gt;
              &lt;/div&gt;
              &lt;div class="pw"&gt;
                  &lt;input type="password" name="upw" id="upw" placeholder="رمز عبور" class='input-block-level'&gt;
              &lt;/div&gt;
              &lt;div class="submit"&gt;
                  &lt;input type="submit" value="ورود به پرتال مشتریان" class='btn btn-primary'&gt;
              &lt;/div&gt;
              &lt;div class="_response"&gt;
                  &lt;span&gt;&lt;/span&gt;
              &lt;/div&gt;
          &lt;/form&gt;
  
          &lt;div class="forget"&gt;
              &lt;a href="http://www.tgaco.ir/"&gt;&lt;span&gt;بازگشت به وبسایت تحلیلگران امین&lt;/span&gt;&lt;/a&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
   $(function() {
  
  
      $("#login-form").submit(function(){
      var uemail = $("#uemail").val();
      var upw = $("#upw").val();
  
          $.post('index.php',{email:uemail,pass:upw},function(data){
              if(data){
  
                      if(data == 1){
                          document.location.href = "admin/index.php"; 
                      }
                      else {
                      alert(data);
                      }
  
              }
          });
           return false;
      });
  
   });
  
  &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>