header redirect not working on server but working on localhost
<p>I'm using bluehost as my webhost, I'm having a few problems. The code below is my point of confusion. </p>

<pre><code>&lt;?php
include '../init.php';
error_reporting(0);
?&gt;
&lt;div class='container'&gt;
&lt;html&gt;
&lt;head&gt;
&lt;link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap.min.css"&gt;
&lt;link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap.css"&gt;
&lt;link rel="stylesheet" type="text/css" href="/bootstrap/css/responsive.css"&gt;    
&lt;link rel="stylesheet" type="text/css" href="/bootstrap/css/responsive.min.css"&gt;
&lt;script language="JavaScript" type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" type="text/css" href="SignIn.css"&gt;
&lt;title&gt;SoundBooth - Sign in&lt;/title&gt;
&lt;link rel="icon" href="../Images/Logo.png" type="image/x-icon"/&gt;
&lt;/head&gt;
&lt;body  background="../Images/BGMain.png"&gt;
&lt;div class='signinLabel'&gt;Sign in&lt;/div&gt;
&lt;div class='bg'&gt;&lt;/div&gt;
&lt;div class='user'&gt;Username&lt;/div&gt;
&lt;div class='pass'&gt;Password&lt;/div&gt;
&lt;form action="index.php" method='POST'&gt;
  &lt;input name='Username' autocomplete="off"class='usr' type="text" style='height:34px;'/&gt;
  &lt;input name='Password' autocomplete="off"class='pas'type="password" style='height:34px;'/&gt;

  &lt;input type='submit' class='submit' value='Log in' &gt;&lt;/input&gt;
&lt;/form&gt;
&lt;a class='forgotPass' href="#"&gt;(Forgot password)&lt;/a&gt;
&lt;div class='no-account-label'&gt;Don't have an account? |&lt;/div&gt;
&lt;a class='no-account-button' href="/signup"&gt;Sign up&lt;/a&gt;
&lt;?php
 if (empty($_POST) === false){
    $username = $_POST['Username'];
    $password = $_POST['Password'];

    if (empty($username) || empty($password)){ ?&gt;
            &lt;div style="float:left;margin:-415px 200px;width:500px;text-indent:100px;"class="alert alert-error"&gt;You need to enter a username and password!&lt;/div&gt;
            &lt;?php
        }elseif (user_exists($username) === false){?&gt;
            &lt;div style="float:left;margin:-415px 170px;width:500px;text-indent:100px;"class="alert alert-error"&gt;We can't find that username! Have you &lt;a style='color: rgb(185, 74, 72);' href='../HTML/signup.html'&gt;registered?&lt;/a&gt;&lt;/div&gt;
            &lt;?php
        }elseif (user_active($username) === false){ ?&gt;
            &lt;div style="float:left;margin:-415px 200px;width:500px;text-indent:100px;"class="alert alert-error"&gt;You haven't activated your account!&lt;/div&gt; &lt;!--Remove this--&gt;
            &lt;?php
        }else{

            $login = login($username, $password);
            if ($login === false){ ?&gt;
            &lt;div style="float:left;margin:-415px 200px;width:500px;text-indent:100px;"class="alert alert-error"&gt;The username or password you have entered is incorrect!&lt;/div&gt;
            &lt;?php
            }else{
                $errors[] = 'Logging In...';
                $_SESSION['user_id'] = $login;
                if (isset($_SESSION['user_id'])){
                mysql_query("UPDATE `users` SET `online_offline`='1' WHERE `user_id`='$_SESSION[user_id]'");
                }
                header("Location: http://sound-booth.com/");
                exit();
            } 
        }
    }
    echo output_errors($errors)
?&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>is the link to the script. It works in localhost, but not in my actual server. Not even the header() redirect works. </p>

<p>Could somebody please explain this?</p>

<p><strong>Solution:</strong></p>

<pre><code>ob_start();
</code></pre>
