I'm havving the same problem, because i want to run some code in the background and then jump to a new page. it looks like this:
if ( isset( $username ) or isset( $password ) ) {
$dberror = " ";
$ret = add_to_database( $username, $password,
&$dberror );
if ( ! $ret )
print "Error: $dberror<BR>";
else
header("location: viewClients.php");
} else {
header("location: addNewClient.php");
}
i left out the databse part because it never gets that far.