I'm trying to hide a content of a page using PHP but always get an error
this is the code I'm using. Data from $pass
comes from a form submited from the other page:
<?php
$pass = $_POST['pass'];
$password = "content"; // Modify Password to suit for access, Max 10 Char.
?>
<html>
<title></title>
<head>
<?php
// If password is valid let the user get access
if ( "$pass" == "$password") {
?>
<!-- START OF HIDDEN HTML - PLACE YOUR CONTENT HERE -->
</head>
<body>
You have gained access!
<!-- END OF HIDDEN HTML -->
<?php
} else {
// Wrong password or no password entered display this message
print "<p align=\"center\"><font color=\"red\"><b>Restricted Area!</b><br>Please enter from the log in page</font></p>";}
}
?>
</body>
</html>