ho creato questo codice ma continua a dare il seguente errore
Parse error: syntax error, unexpected T_ELSE on line 45
il codice è questo:
Codice PHP:
<?php
$nome = $_POST['nome'];
$password = $_POST['password'];
if(isset($nome) || isset($password)) {
require 'config.php';
require 'connect.php';
$ricevuta = mysql_query("SELECT id, utente, mail, password, ban, fazione FROM utenti WHERE utenti = '$nome' ");
while ($row = mysql_fetch_array($ricevuta, MYSQL_BOTH)) {
if ($row['password'] == $password) {
if ($row['ban'] == '0') {
session_start();
$_SESSION['user'] = $row['name'];
$_SESSION['mail'] = $row['mail'];
$_SESSION['fazione'] = $row['fazione'];
?>
Login effettuato
<?php
}
else
{
?>
Sei stato bannato.
}
}
else
{
?>
<h1>Username o Password errati.</h1>><br />
<a href="#" onclick="history.go(-1);return false;"><img width="55" height="55" border="0" src="http://ilmiocaos.altervista.org/_altervista_ht/back.png" alt="Indietro" title="Indietro"></a>
<?php
}
}
mysql_close();
}
else
{
?>
<h1>Devi inserire Username e Password.</h1><br />
<a href="#" onclick="history.go(-1);return false;"><img width="55" height="55" border="0" src="http://ilmiocaos.altervista.org/_altervista_ht/back.png" alt="Indietro" title="Indietro"></a>
<?php
}
?>
Dov'è che ho sbagliato?
Grazie mille