All pastes #500067 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-21 12:42 UTC
rendered paste body

FILENAME: Blog.php 
------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<?php 
session_start();
include "dbconn.php";
$query="SELECT topic as top from blog";
$result=mysql_query($query) or die("unable to execute query");
$row=mysql_fetch_assoc($result);
$topic=$row['top'];
$message=$_POST['message'];
$user=$_SESSION['username'];
$query="INSERT into blog(topic,message,user) values('$topic','$message','$user')";
$result=mysql_query($query);
mysql_close($connection);
header("location:Blog.php");
?>
<body>
</body>
</html>


Problem : 
--------- 

On localhost (Home computer - winxp pro running apache) - this script works fine. 
On Remote Linux server - The script runs fine (it adds the record to the table) but the redirection header("location:Blog.php");
seems to cause a problem. The script is called and I see a blank white screen BUT the redirection doesnt take place ALTHOUGH the record is being added succesfully if I open the page explicitly using the URL