title: MySQL Check if username and password matches in Database
body: <p>I have a form which has a textbox with the name attribute <em>username</em> and another one with the name attribute <em>password</em>.
  I also have a database with columns called <em>user</em> and <em>pass</em>. When my users signed up it added the username to the <em>user</em> column and password to the <em>pass</em> column.</p>
  
  <p>How would I make a MySQL query to check if the form submitted the right username and password and then if it did have a branch to let me input the code for if it succeeded?</p>
  
  <p>I really need some code, this bit isn't going well I know it should be something like <code>SELECT * FROM table WHERE username == $username AND...</code> but then I'm stuck because I have an MD5 password in the database and that first bit is probably wrong. Please help. :)</p>
  
  <p>Thanks</p>