Código PHP:
sql="select * from usuario (esta es la linea 10)
where login='$txtUsuario' and password='$txtPasswd'";
$resultado=mysql_query($conexion,$sql); or die( "Error en $sql, error: " . mysql_error() );
$num_rows = mysql_num_rows($resultado);
if ($num_rows==1){
while($fila=mysql_fetch_array($resultado)){
session_start();
$_SESSION['login']=$txtUsuario;
$_SESSION['idUser']=$fila['idUser'];
}
header("Location: http://cleanhousemexico.com/paginas/aut/valido.php");
}
else{
header("Location: http://cleanhousemexico.com/paginas/aut/novalidado.php?error=1");
session_destroy();
}
Yo haria algo asi (no lo ejecute puede tener algun error)