Sia che io faccia il login giusto che no mi rimanda alla pagina destry.php....
qualcuno sa come aiutarmi?
stò sclerando
gabi
CODICE:
<?php session_start(); ?>
<html>
<head>
<title> login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../a+a/form/javascript/stilitest.css">
</head>
<body>
<?php
if (isset($invio)) {
//apre il file delle passwords
$puntatore = fopen("pasx.txt", r);
//setto variabile trovato
$trovato = 0;
//finche...
while ((!feof($puntatore)) && (!$trovato)) {
$linea = fgets($puntatore, 50);
$trovato = stristr($linea, $userid);
$puntatore++;
}
fclose($puntatore);
list($nomeutente, $password) = split("~:~", $linea);
$password = trim($password);
if (($trovato) && ($passwd == $password) ) {
//registro la sessione
session_register('autorized');
//variabile di sessione
$autorized = 1;
//invio alla pagina
echo "
<script language=\"JavaScript\">
<!--
document.location.href =\"moduloUNIFICATO.php\"
//-->
</script>
";
//oppure richiamo destroy
} else {
echo "
<script language=\"JavaScript\">
<!--
document.location.href = \"destroy.php\"
//-->
</script>
";
}
} else {
// HTML ?>
<table border="0" cellspacing="0" cellpadding="10" border="0" bgcolor="#FF6600">
<tr>
<td>
<form method=post action="../a+a/form/check.php">
<font color="#FFFFFF" align="center" size="-1">
inserite nome utente e password
</font>
<table width="300" class="tableclass" cellpadding="4" cellspacing="1" align="center">
<tr>
<td class="tableheader">
nome utente:
</td>
<td class="tablecell">
<input type="text" name="userid" class="tableclass">
</td>
</tr>
<tr>
<td class="tableheader">
password:
</td>
<td class="tablecell">
<input type="password" name="passwd" class="tableclass">
</td>
</tr>
<tr>
<td>
<input type="submit" name="invio" value="invio" class="pulsanti">
<input type="reset" name="cancella" value="cancella" class="pulsanti">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?php //fine HTML
}
?>
</body>
</html>