segun yo
Código PHP:
echo $strSQL;
SELECT user, ID from soluciones where user = 'rene' and ID = '1111'
pero en vez de eso arroja
SELECT user, ID from soluciones where user = '' and ID = '0'
entonces, segun el siguiente codigo ¿debo de recibir esta ultima linea o la primera? y tambien ¿como afecta que comienze con
Código PHP:
]<?php session_start(); ?>
Código PHP:
<?php session_start(); ?>
<html>
<head>
</head>
<body>
<form action="login.php" name="login" method="post">
User <input type="text" size="20" name="user">
Password <input type="password" size="20" name="pass">
<input type="submit" name="submit" value="Aceptar">
</form>
<?php
if ($submit)
{
$dbcnx = mysql_connect("localhost", "selex", "seguridad911");
mysql_select_db("selex", $dbcnx);
$strSQL = "SELECT user, ID from soluciones where user = '$user' and ID = '$pass' ";
$res = mysql_query($strSQL);
echo $strSQL;
$x = @mysql_num_rows($res);
if ($rs= @mysql_fetch_array($res))
{
$_SESSION['user'] = $rs['user'];
$_SESSION['pass'] = $rs['ID'];
} //end if session y redireccion para desplegar informacion en la otra pagina con bandera para identificar si se llego a esa pagina por medio de esta
elseif ($x=='0')
{
$error = "Verifica tu Username y Password";
echo $error;
}//end if error login
}//end submit
?>
</body>
</html>