Password protection problem!

Below are the codes I wrote. I want to have password protection for my page which can only be seen by people with the correct password.
Of course something wrong with my codes.
Who can help me do it right? Thank you:D

code:

<?php
print <<<enterpassword

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

<html xmlns=“http://www.w3.org/1999/xhtml”>

<head>

<title>Please enter your password</title>

<meta http-equiv=“Content-Type”

content=“text/html; charset=utf-8” />

</head>

<body>

<h1>Hello, my friends! Welcome!!</h1>

<form method=“get” action=“aaa.php”>

<fieldset>

<legend>password protection</legend>

<p>

<label for=“password”>Please enter your password:</label>

<input type=“password” name=“password” id=“password” /><br /><br />

</p>

<label for=“text”>Please write your opinions:</label><br />

<p>

<textarea name=“text” rows=“9” cols:“11” id=“text” />

</p>

<p><input type=“submit” value=“Click and Submit”/></p>

</fieldset>
</form>

</body>

</html>

enterpassword;

if(password==‘abc’)

print <<<newpage

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

<html xmlns=“http://www.w3.org/1999/xhtml”>

<head>

<title>Welcome</title>

<meta http-equiv=“Content-Type”

content=“text/html; charset=utf-8” />

</head>

<body>
<h1>Welcome to my website!</h1>

</body>

</html>

newpage;

else {
<h1>Your password is incorrect!!<h1>
}

?>

chihuyu. There is an entire array of things that are not included in your post one of which is very basic. There should be a “username” and a “password” verification process for a user authentication system. I suggest you study some tutorials on security and the process of verifying data against a database (xml or mysql).

Here is a good tutorial for beginners. http://tinsology.net/2009/06/creating-a-secure-login-system-the-right-way/.

And here is another so you can see the different ways to approach this subject. http://webhostchecklist.net/simple-php-user-authentication/.
Have fun and good luck!