Código:
<?php include ('include/bd.php'); //Conexion bd establecida y operativa $user = $_POST['user']; $password = $_POST['password']; $password = md5($password); $sql = mysql_query('SELECT * FROM `user` WHERE `user` = '.$user); $sql2= mysql_query('SELECT * FROM `user` WHERE `password` ='.$password); $sql3= mysql_query('SELECT * FROM `user` WHERE `user` = '.$user.' AND = `password` ='.$password); $resultado if(mysql_num_rows($sql)>0){ if(mysql_num_rows($sql2)>0){ if(mysql_num_rows($sql3)==1){ echo "Ingresando a intranet"; }}else{ echo "Error password ingresado";} }else{ echo "Error usario no encontrado";} } mysql_close(); ?>