title: PHP header and refresh not working
body: <p>My server running in <strong>PHP 5.2.9</strong>, When I using <strong>refresh and header</strong> functions it's not working. Here is my code</p>
  
  <pre><code>header("location: index.php");
  
  header( "Refresh: 0;" );
  </code></pre>
  
  <p>Previously I'm working in a different server, It's working correctly. How can I solve this problem?</p>
  
  <p>this is my complete code</p>
  
  <pre><code>if($_POST['sign_in'])
  {
      $email = $_POST['email'];
      $password = $_POST['password'];
      $sql = "SELECT * FROM tbl_members WHERE m_email='$email' and m_password='$password'";
      $res = mysql_query($sql);
      $count = mysql_num_rows($res);
      if($count==1)
      {
          session_register("email");
          header("location: index.php");
      }
      else
      {
          $sql = "SELECT * FROM tbl_temp_members WHERE email='$email'";
          $res = mysql_query($sql);
          $count = mysql_num_rows($res);
          if($count==1)
          {
              echo "Login unsuccessful,Account still not activated";  
          }
          else
          {
              echo "Login unsccessful";
          }
      }
  }
  </code></pre>