title: Logging In via AJAX/MySql/PHP
body: <p>Basically I want to check a database to see if the username and password are a match if so unlock the submit button.</p>
  
  <pre><code>&lt;?php
  mysql_connect('localhost', '', '');
  mysql_select_db('database');
  if(isset($_POST['submit'])){
      mysql_query("SELECT username,password FROM table WHERE username='".$_POST['username']."',password='".$_POST['password']."'")
  }
  ?&gt;
  </code></pre>
  
  <p>Form:</p>
  
  <pre><code>&lt;form method="post"&gt;
  Username &lt;input type="text" name="username" /&gt;
  Password &lt;input type="password" name="password" /&gt;
  &lt;input type="submit" name="submit" value="Login" /&gt;
  &lt;/form&gt;
  </code></pre>