php page not redirecting
<p>In the code below i am able to update the database,but it not redirecting the to page given in header location,its refreshing and showing the same page itself,i copied the code from other which was working well in updating the db and redirecting</p>

<pre><code>  &lt;?php

if (isset($_POST['submit']))
 { 
 // get form data, making sure it is valid
 $firstname = mysql_real_escape_string(htmlspecialchars($_POST['firstname']));

 $link = mysql_connect('www.xxxxxxx.co.uk', 'xxxxxx', 'axxxxxd');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}

mysql_select_db("web39-sdasdasd", $link);
mysql_query("INSERT learning_outcome SET topic='$firstname'")
 or die(mysql_error()); 

 header('Location: http://www.xxxxxx.co.uk/NottTest/viewlearnpc.php?succmsg=UPDATE SUCCESSFULL'); 
 }

 else

 echo "";

 ?&gt;
</code></pre>
