Ciao a tutti,
dovrei fare un login leggendo i dati da un file PHP.

Il codice HTML è:

<form id="LoginForm" name="LoginForm" method="post" action="Lib/Login.php">
<table width="161" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="73" scope="col">Nome Utente</th>
<th width="88" scope="col"><span id="sprytextfield1">
<label>
<input type="text" name="Username" id="Username" />
</label>
<span class="textfieldRequiredMsg">È obbligatorio specificare un valore.</span></span></th>
</tr>
<tr>
<th scope="col">Password</th>
<th scope="col"><span id="sprytextfield2">
<label>
<input type="text" name="Password" id="Password" />
</label>
<span class="textfieldRequiredMsg">È obbligatorio specificare un valore.</span></span></th>
</tr>
<tr>
<th scope="col"></th>
<th scope="col"><label>
<input type="submit" name="Accedi" id="Accedi" value="Accedi" />
</label></th>
</tr>
<tr> </tr>
<tr> </tr>
</table>
</form>
PHP deve aprire un file il cui nome è uguale all'username dell'utente.

Ho provato con questo codice

Codice PHP:
<?php
include("$folder$userfile");
$userfile $HTTP_COOKIE_VARS["user"];
$folder  "Accounts/";
$pass $_POST['Password'];
$user $_POST['Username'];
if ( 
$user == $Username && $pass == $Password ) {
    
setcookie ("User","$Username",time()+60000,"/");
    
header("location:../");
} else {
    echo 
"Username o password errato/i";
}
?>
Ma non funziona. Potreste aiutarmi gentilmente?
I files con i dati del login si trovano nella cartella "Accounts".

Grazie!