Aiutatemi ragazzi altrimenti lancio il computer dalla finestra
Sto facendo delle prove per un form di login ma mi da un problema allora il form funziona metto l user e la pass e mi fa accede alla pagina ma se io metto l indirizzo per esteso compresa la èagina che dovrebbe essere protetta me la apre comunque allego un esempio su altervista
http://provepa.altervista.org/ user prova pass abc e si apre http://provepa.altervista.org/prova.html
ma se scrivo direttamente l'indirizzo http://provepa.altervista.org/prova.html me lo apre direttamente senza fare login
vi allego gli script

index.html

<html>
<title>
</title>
<style type="text/css">
<!--
body {
background-color: #00FF66;
}
-->
</style><head>



<td align="center" valign="middle"><form action="controllo.php" method="post">
<table width="280" border="0" cellpadding="0" cellspacing="0">
<tr align="center" valign="middle">
<td width="140" height="30" align="center"><div align="center">User : </div></td>
<td width="149" height="30"><input name="user" type="text" id="user" size="15"></td>
</tr>
<tr align="center" valign="middle">
<td height="30"><div align="center">Password : </div></td>
<td height="30"><input name="password" type="password" id="password" size="15"></td>
</tr>
<tr align="center" valign="middle">
<td height="30"><input type="submit" name="Submit" value="Login"></td>
<td height="30" align="left"><input type="reset" name="Submit" value="Resetta"></td>
</tr>
</table>
</form>
</head>
</html>

controllo.php

<?php
$data=date("m.d.y, H:i:s");
include('database.php');
if(in_array($_POST['user'],$datauser)){
$valuser= 1;
$chiaveuser = array_search($_POST['user'], $datauser);
}
if(in_array($_POST['password'],$datapassword)){
$valpassword= 1;
$chiavepassword = array_search($_POST['password'], $datapassword);
}
$valsomm= $valuser+$valpassword;
if(($valsomm==2)&&($chiavepassword==$chiaveuser)){
//bisogna creare un file per ogni utente registrato ... il nome del file deve //essere uguale al nome dell'utente che deve accedere alla pagina propria.
//ES. abc.php (per utente abc)
//ES. def.php (per utente def)
//e così via
header("Location: $wwww.gazzetta.it");
}else{
//invece qui ci devi mettere la pagina a che da errore nell inserimento del login
include('errore.html');
}
?>

database.php

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

<?php
//inserisci tra le parentesi i nomi utenti separati da virgola
$datauser = array(prova, ciao, cellulare);
//inserisci la password per ogni utente
$datapassword = array(abc, def, ghi);
?>
</head>


<body>

</body>
</html>


vi prego aiutatemi