Problems with if help
Posted: Mon Aug 24, 2009 10:18 am
Hello i have a problem with this if, i'm trying to make it work but the else sentence doesn't work, when the condition is true it works but when its false it doesn't 'cause it doesn't show anything it leaves the page blank. Please help.
Code: Select all
$user = $_POST ["usuario"];
$pass = $_POST ["password"];
$result = mysql_query("SELECT * FROM clientes
WHERE clientes_correo='{$user}';");
while ($row = mysql_fetch_array($result))
{
if ($pass==$row['clientes_password'])
{
echo "Tus datos son correctos da click para continuar <br/>";
$_SESSION['usuario']=$user;
$_SESSION['nombre']=$row['clientes_nombre'];
echo "<a href=index.php>Continuar";
}
elseif ($pass!=$row['clientes_password'])
{
echo "Tus datos son incorrectos da click para continuar";
echo "<a href=index.php>Continuar";
}
else
echo "Error: Intente Nuevamente";
}
?>