// ARQUIVO 1 - untitled.htm

<html>
<head>
</head>

<script>
var message = prompt("Digite sua Senha","");

document.write("<br><form name=\'form1\' action=\'untitled.php\'><input type=\'hidden\' name=\'senha1\' value=\'" +message+ "\'><input type=\'submit\' value=\'Verificar\'></form><br>");

</script>

</body>
</html>

// ARQUIVO 2 - untitled.php

<?
$arquivo = "untitled.htm";
$senha = "teste";
?>
<html>
<head></head>

<body>

<?php
if(!$senha1) exit();

if ($senha1 == $senha) {
    include $arquivo;
} else {
    echo "Senha Incorreta"
    echo "<a href=\'untitled.htm\'>Tentar denovo</a>"
    exit();
}

?>
</body>
</html>