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" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />


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


<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 />



//retrieve our data from POST  

$password = $_POST['password'];  

 if($password == 'aaaa')  

print <<< html

   <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 type="text/javascript"

  <a href="****suyifei/MyTeachingMaterials.html"><h3 align="center">*(2)*</h3></a> 


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



Question No.1:

Once I visit:

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