Si, lo tengo asi: e10adc3949ba59abbe56e057f20f883e, en MD5..
No sé que puede pasar. Así lo tengo yo:
Código PHP:
Ver original<?php
include("include/cons.php");
include_once("include/inctexteadmin.php");
$link=mysql_connect($server,$dbuser,$dbpass) or
die ("Impossible connectar amb el servidor"); $query = sprintf("SELECT id_usuari, password, codi, sam, clau_permis, clau_idioma, deshabilitat FROM usuaris WHERE codi='".$login."' and password='".$pass."'");
//$n = mysql_num_rows($result) or die (mysql_error());
echo "hola";
echo "<script language='JavaScript'> alert('Consulta OK.');</script>";
//echo $array["password"];
$password=$array["password"];
$codi=$array["codi"];
if ($password != $pass){ //comprovem que l'usuari i la pass siguin correctes
echo "hola";
echo "<script language='JavaScript'> alert('Contraseña incorrecta.');</script>";
echo "<META HTTP-EQUIV='Refresh' CONTENT='0;url='index.php'>";
}elseif ($codi != $login){
echo "hola";
echo "<script language='JavaScript'> alert('Usuario incorrecto.');</script>";
echo "<META HTTP-EQUIV='Refresh' CONTENT='0;url='index.php'>";
}elseif (($password != $pass) && ($codi != $login)){
echo "hola";
echo "<script language='JavaScript'> alert('Usuario y contraseña incorrectos.');</script>";
echo "<META HTTP-EQUIV='Refresh' CONTENT='0;url='index.php'>";
}else{
$_SESSION["id_usuari"]=$array["id_usuari"];
$_SESSION["codi"]=$array["codi"];
$_SESSION["password"]=$array["password"];
$_SESSION["sam"]=$array["sam"];
$_SESSION["clau_permis"]=$array["clau_permis"];
$_SESSION["clau_idioma"]=$array["clau_idioma"];
$_SESSION["deshabilitat"]=$array["deshabilitat"];
$idioma = $_SESSION["clau_idioma"];
if ($idioma == 1){
$_SESSION["idioma"] = "cs";
}else{
$_SESSION["idioma"] = "ct";
}
$_SESSION["idiomes"] = "cs,ct";
$deshabilitat = $array["deshabilitat"];
if ($deshabilitat == 1){ //si l'usuari està deshabilitat
?>
<script language="JavaScript" type="text/JavaScript">
<!--
alert('<?=texte($_SESSION["idioma"],"txtdeshabilitat")?>');
top.location = "index.php";
-->
</script>
<?php
}
}
}else{
echo "<script language='JavaScript'> alert('Login INCORRECTE');</script>";
echo "<SCRIPT LANGUAGE='JavaScript'> location.href='index.php'; </SCRIPT>";
}
?>