How can I make part of page disappear after loading the page?

Here are my codes:

<!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=gb2312" />
<title>Register</title>
</head>

<body>

<form name="login" action="login.php" method="post">  

<fieldset>

<legend>password protection</legend>

 <br />
 
 <label for="password">Please enter your password:</label>   <br /> <br />
 
<input type="password" name="password" id="password" />  <br /> <br />

<input type="submit" value="^_^-Click and Submit-^_^" />  <br /> <br />
 
 </fieldset>

</form> 



<?php  

//retrieve our data from POST  

$password = $_POST['password'];  
   

 if($password == 'aaaa')  

print <<< html

   <html>
   
   <head><title>login</title></head>
   
   <body bgcolor="#fffed9">
   
   
   
   <script type="text/javascript"><!--
google_ad_client = "pub-***************";
/* 728x90, 10-4-25 */
google_ad_slot = "**********";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
  <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


  <a href="http://mydreampark.com/****suyifei/MyTeachingMaterials.html"><h3 align="center">*(2)*</h3></a> 
  
   </body>
  
   <html>

html;

  
  else {
   header('Location: http//mydreampark.com//login.php'); 
  print "You've entered the wrong password. Please contact the administrator!";
 
  }

?>






</body>
</html>

Question No.1:

Once I visit: http://mydreampark.com/login.php

I can see this nasty-looking thing:

Why? How can I remove it?

Question No.2:

After I enter the right password, the right page loads:
How can I make the part below automatically disappear?

Q1. You are sending stuff to the clients browser before using the redirect.

Q2. Have it show if the user isn’t logged in.

You might be advised to check out Session variables