title: Using PHP script to log in but wont work?
body: <p>below is the index.html which shows the user the password and email entry forms</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  
  
  &lt;title&gt;Ryan Kelly&lt;/title&gt;
  
  &lt;link href="css/bootstrap.min.css" rel="stylesheet"&gt;
  &lt;link href="main.css" rel="stylesheet"&gt;
  
  &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
  &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt;
  
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-35774778-1']);
  _gaq.push(['_trackPageview']);
  
  (function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async =               true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') +       '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php include 'comments.php'; ?&gt;
  
  &lt;div class="container"&gt;
  
  &lt;div class="centre"&gt;
  
  &lt;div class="well"&gt;
      &lt;h1 class="titlecomment"&gt;Comment System&lt;/h1&gt;
  
      &lt;h4 class="instructions"&gt;Please login below with your username and      password&lt;/h4&gt;
  
      &lt;form class="form-horizontal"&gt;
    &lt;div class="control-group"&gt;
    &lt;label class="control-label" for="inputEmail"&gt;Email&lt;/label&gt;
    &lt;div class="controls"&gt;
    &lt;input type="text" id="inputEmail" placeholder="Username" method="post"&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="control-group"&gt;
    &lt;label class="control-label" for="inputPassword" &gt;Password&lt;/label&gt;
    &lt;div class="controls"&gt;
    &lt;input type="password" id="inputPassword" placeholder="Password" method="post"&gt;
    &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="control-group"&gt;
    &lt;div class="controls"&gt;
  
     &lt;/div&gt;
    &lt;/div&gt;
    &lt;/form&gt;
  
    &lt;div class="greenbutton"&gt;
    &lt;button type="submit" class="btn btn-success" method="login()"&gt;Login&lt;/button&gt;
    &lt;/div&gt;
  
    &lt;/div&gt;
    &lt;div class="footer"&gt;Created by Ryan Kelly&lt;/div&gt;
  
    &lt;/div&gt;
  
   &lt;/div&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>and below is the PHP script which checks the email and password and then redirects the user to google, i only redirecting because i wanted to see if it logged in successfully</p>
  
  <pre><code>            &lt;?php        
  
              function login() {
  
  
      $connection = mysql_connect($host, $databaseUsername, $databasePassword);
  
      $username = $_POST['inputEmail'];
      $password = $_POST['inputPassword'];
  
      mysql_select_db($connection);
  
      $queryUsername = "SELECT * FROM login WHERE Username='$username'";
      $queryPassword = "SELECT * FROM login WHERE Password='$password'";
  
      $searchQuery = mysql_query($queryUsername);
      $searchQueryDatabase = mysql_query($queryPassword);
  
        if($searchQuery &amp;&amp; $searchQueryDatabase = $username &amp;&amp; $password) {
  
          header('Location: http://www.google.co.uk');
        }
  
  }
  ?&gt;
  </code></pre>