[PHP]: Why page is not redirecting?
<p>In the following code, the "header:" line is giving problem.</p>

<pre><code>  $q = mysql_query($a) or die(mysql_error());
  $row = mysql_fetch_array($q);

   $ValidationResponse = "false";

   if ($_COOKIE['user_name'] != "")
    {
  while ($row) {
      if ($_COOKIE['user_name'] = $row['username'])
      {
     $ValidationResponse = "true";
     break;
    }
   }
    if ($ValidationResponse == "true")
  {
   ob_start();
   header("location:personal_view.php");
   ob_clean();
  }
  else
   echo "&lt;script&gt;alert('Invalid Login. Try Again.');&lt;/script&gt;";
  }
    $_COOKIE['user_name'] = "";
</code></pre>
