title: Redirect to page after true result
body: <p>Hello thanks for your time.
  I have a file called get getresult.php it checks for username and password on mysql server for users that login.</p>
  
  <p>I just it to redirect to a page index.php if login is successful.
  Thanks for any help the can be provided.</p>
  
  <pre><code>&lt;?php
  // version 1.1
  if (isset($_POST['password'])) // if the password is set then the  form has been submitted on login.php page
  {
   include("config.php");
   $username =  mysql_real_escape_string($_POST['username']);
   $password = mysql_real_escape_string($_POST['password']);
   $qstr = "SELECT * from members where username ='$username' and password ='$password'";
  
   $result = mysql_query($qstr);
   if (mysql_num_rows($result)) echo "&lt;font color=#008000&gt;&lt;Center&gt;&lt;b&gt;**Successful Login**&lt;/b&gt;&lt;/Center&gt;&lt;/font&gt;" 
   **//// I thought maybe this would be the section for the redirection code****
  ;
  
  else echo "&lt;font color=#ff0000&gt;&lt;Center&gt;&lt;b&gt;**Failed Login**&lt;/b&gt;&lt;/Center&gt;&lt;/font&gt;";
   mysql_close();
  }
  else echo "&lt;font color=#ff8000&gt;&lt;Center&gt;&lt;b&gt;**No login attempted**&lt;/b&gt;&lt;/Center&gt;&lt;/font&gt;";
  
  ?&gt;
  </code></pre>