title: jquery mobile logging in and accessing/rejecting page
body: <p>I know this site isn't asking for people to work on a specific code, but I'm having a real hard time looking for examples/tutorial on jquery mobile login. I'm not sure if I'm doing this right, but I'm trying to get a user to login based on mysql database (if user is in my database), but I'm trying to figure out what to write up when user logs in? How do i set up so it will redirect to home page? </p>
  
  <p>PHP page </p>
  
  <pre><code> if(isset($_POST['email']) &amp;&amp; isset($_POST['pass'])){
      $email = mysql_real_escape_string($_POST['email']);
      $password = md5(mysql_real_escape_string($_POST['email']));
  
      $sql = mysql_query("SELECT password,email FROM users WHERE email = ".$email." AND password = ".$password." LIMIT 1");
  
  }
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>   $('form#login').submit(function(){
        var email = $("form#login input.email").val();
        var pass = $("form#login input.pass").val();
             $.post("ajax/post_login.php", {email: email, pass: pass},
                 function(data){
                 alert("failed"); //if not logged in
                 });
      });
  </code></pre>
  
  <p>I'm having trouble here? </p>
  
  <p>Can someone help me out with jquery mobile?</p>
  
  <p>I have different many <code>&lt;div data-role="page"&gt;(content here)&lt;/div&gt;</code> and I want to know how to access a certain page, when logged in? and if email/username fails, theres an error?</p>
  
  <p>I appreciate your help! Thank you!</p>