提供用户名和密码后,标题不会重定向到特定页面

I am using header statement to redirect my user to specific page after successful or un Successful login, but the header statement is not redirecting me to that specific page. and if i see the URL i can find (#) sign instead of the specific page

Though the same code is working on other server. I have read most of the questions and tried almost all the answer on Stackoverflow.com but all in vain. Here is my code:

if($_POST)
{
    ob_start();
    $office = $_POST["search_category"];
    $sub_category = $_POST["sub_category"];
    $password = md5($_POST["password"]);
    $query = "select * from contacts where officeid = $office and Posting = '$sub_category' and password = '$password'";
    $result = mysql_query($query) or die('Mistake in query');
    $count = mysql_num_rows($result);
    if ($count>=1)
     {
        $data = mysql_fetch_array($result);
        $_SESSION['user'] = $data['Posting']; 
        $_SESSION['semenu'] = $data['semenu'];
        $_SESSION['seid'] = $data['seid'];
        if ($_SESSION['semenu'] == 1 or $_SESSION['semenu'] == 2)
            header("location:contenrollment.php");
    else
        header("location:relogin.php");
        exit;
    ob_end_flush(); 
}?>

Instead of redirecting to any of the above two pages, I am redirected to a blank page and the blank page has the exact URL but only has (#) instead of file name. I have also checked the query, There is no mistake in it.

If your scripts located in root directory of site, try to use:

    header("Location: /contenrollment.php");

or

    header("Location: /relogin.php");