PHP Header not redirecting to home.php
<p>I'm trying to make the header redirect, it was working like 2 days ago and I don't know what i've done to break it. It now just reloads the page but starts the session.</p>

<p>This is the code,</p>

<pre><code>&lt;?php

if(isset($_SESSION['id']))

{
 header("Location: home.php");
}

require_once 'global.php';

?&gt;

&lt;head&gt;
 &lt;title&gt;BookWizard - Join Now!&lt;/title&gt;




&lt;meta charset="utf-8" /&gt;
    &lt;meta name="description" content="FORMETER jQuery plugin" /&gt;
    &lt;link rel="stylesheet" href="//fonts.googleapis.com/css?family=Marmelad"&gt;
    &lt;link rel="stylesheet" href="/_secure/stylesheets/style.css" /&gt;
    &lt;link rel="stylesheet" href="css/formeter.1.0.css" /&gt;
    &lt;!--[if IE]&gt;&lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;
                  &lt;/script&gt;&lt;![endif]--&gt;
    &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;

    &lt;/script&gt;
    &lt;script src="javascript/formeter.1.0.min.js"&gt;&lt;/script&gt;
    &lt;script&gt;
        $(function(){
            $('#percentage').formProgress({
                'speed' : 800,
                'style' : 'green',
                'bubble' : true,
                'selector' : '.recommended'
            });
        });
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;header&gt;
        &lt;a class="logo" href="index.html"&gt;&lt;!-- --&gt;&lt;/a&gt;
    &lt;/header&gt;
    &lt;div id="wrapper"&gt;




        &lt;div class="clear"&gt;&lt;/div&gt;
        &lt;div id="container"&gt;

            &lt;div id="registercontainerno"&gt;

         &lt;img src="images/logo.png" class="frontpagelogo"&gt;


   &lt;div class="meter" style="position:absolute; margin-left: 50px; margin-top: 20px;"&gt;
                    &lt;div id="percentage" data-percent=""&gt;&lt;/div&gt;
                &lt;/div&gt;



      &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;

            &lt;h2 class="paragraphf"&gt;BookWizard Information&lt;/h2&gt;


&lt;?php
if(isset($_POST['password']))
{
$firstname = mysql_real_escape_string($_POST['firstname']);
$email = mysql_real_escape_string($_POST['email']);
$username = mysql_real_escape_string($_POST['username']);
$password = ($_POST['password']);

$lastname = mysql_real_escape_string($_POST['lastname']);
if(mysql_num_rows(mysql_query("SELECT * FROM users WHERE username='$username'")) == 0) {
mysql_query("INSERT INTO users (firstname, email, avatar, password, username, lastname)
  VALUES ('$firstname', '$email', 'http://book-wizard.net/images/default.png',   
 '$password',   '$username', '$lastname')");
$_SESSION['id'] = $username;
Header('Location: home.php');
}
else {
echo "Error, Please try again later.";
die();
}
}
?&gt;

            &lt;form method="post"&gt;
&lt;img src="/images/regi.jpg" align="right" style="margin-top: -100px; margin-right:
10px; border-radius: 5px;"&gt;
                &lt;p class="paragraphf"&gt;
                    &lt;label&gt;Username&lt;/label&gt;
                    &lt;input type="text" name="username" class="recommended" /&gt;
                &lt;/p&gt;
                &lt;p class="paragraphf"&gt;
                &lt;label&gt;Password&lt;/label&gt; 

 &lt;input type="password" name="password" class="recommended" /&gt;      

                &lt;h2 class="paragraphf"&gt;Personal Information&lt;/h2&gt;
                &lt;p class="paragraphf"&gt;
                    &lt;label&gt;First name&lt;/label&gt;
                    &lt;input type="text" name="firstname" class="recommended" /&gt;
                &lt;/p&gt;
                &lt;p class="paragraphf"&gt;
                    &lt;label&gt;Last name&lt;/label&gt;
                    &lt;input type="text" name="lastname" class="recommended" /&gt;
                &lt;/p&gt;

                &lt;h2 class="paragraphf"&gt;Contact Information&lt;/h2&gt;
                &lt;p class="paragraphf"&gt;
                &lt;label&gt;Email Address&lt;/label&gt;
        &lt;input type="text" name="email" class="recommended" /&gt;






                &lt;p class="input_bg"&gt;
    &lt;input type="submit" value="SIGN UP" class="buttonr blue"&gt;&lt;a href="index.php"  

 class="buttonr orange"&gt;CANCEL&lt;/a&gt;
                    &lt;br&gt;&lt;br&gt;
                &lt;/p&gt;
            &lt;/form&gt;

            &lt;div class="clear"&gt;&lt;/div&gt;

        &lt;/div&gt; &lt;!-- END container --&gt;
    &lt;/div&gt; &lt;!-- END wrapper --&gt;

    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and in the global.php it does have a session_start();... not sure the problem :S</p>
