title: Incorrect username / password message and redirect
body: <p>Creating a Client Login area. I have my log in form in a clientLogin.html:</p>
  
  <pre><code>       &lt;form name="ClientLogin" method="post" action="login.php"&gt; &lt;br&gt;
              &lt;p&gt;
               &lt;label for='Username'&gt;Username&lt;/label&gt; &lt;br&gt;
              &lt;input type="text" name="username" /&gt;
              &lt;/p&gt;
              &lt;p&gt;
  
              &lt;label for='Password'&gt;Password&lt;/label&gt; &lt;br&gt;
              &lt;input type="password" name="password" /&gt;
              &lt;/p&gt;
              &lt;br&gt;
              &lt;input type="submit" value="Submit" /&gt;
  
          &lt;/form&gt;
  </code></pre>
  
  <p>If the username &amp; password combination are incorrect I want to redirect to this page adding a message saying "incorrect username/ password please try again". This is the code from login.php:</p>
  
  <pre><code>&lt;?php
  
  
  //Connect to the database
      require('db.php');
  
      $user = mysql_real_escape_string($_POST["username"]);
      $pass = mysql_real_escape_string($_POST["password"]);
  
      $clientdata = mysql_query("SELECT * FROM Users WHERE username='$user' and            password='$pass'")
      or die (mysql_error());
  
      $data = mysql_fetch_array($clientdata, MYSQL_ASSOC);
  
      if(mysql_num_rows($clientdata) == 1){
  
  session_start();
  
  
  $_SESSION['username'] = $user;
  
  
  header('Location: profile.php');
  
      }else{
  header('Location: clientLogin.html');
      }
  </code></pre>
  
  <p>I expect the clientLogin.html files needs changing to a .php file. other than that I am stumped. Any guidance would be greatly appreciated. </p>