This is Admin Login code in PHP, when i run the code, it does not load the Page that I want
<p>

<pre><code>@mysql_select_db(fcs)
  or die("Unable to select Database");

//check if the form has been submitted
if(isset($_POST['submit'])){
  $msg="";

  //VALIDATE form information
  if(empty($_POST['uname'])){
    $msg="Please enter your username.";
  }

  if(empty($_POST['upass'])){
    $msg .="Please enter your password.";
  }



  //check length of password
  if(strlen($_POST['upass']) &gt; 6){
    $msg .="Invalid password.";
  }

  if(empty($msg)){


    $sql = "SELECT uname,upass FROM administrator WHERE user ='".$_POST['uname']."'";
    $sql .= "AND password ='".md5($_POST['password'])."'";

    if(!$res = mysql_query($sql)){
      $msg.=mysql_error();
    }else{
      //user exists in system, set the session variables
      if (mysql_num_rows($res) == 1) {

        while($row = mysql_fetch_assoc($res)){
         // the user name and password match,
          $_SESSION['uname'] = $row['uname'];
          $_SESSION['upass'] = $_POST['upass'];

          //Now go to the main page
          header('location../admin.php');
        }
      }else{
        $msg = "Your login details did not match";
      }//end numrows check
    }//end res check
  }


}//end submit check
?&gt;
</code></pre>

<p>Note:</p>

<p>I want to load the (admin.php) Page , if the user name and password was correct else
just disply out  a message:</p>
