You are on page 1of 1

<?

$usuario = $_POST['usuario'];
$password = $_POST['password'];
mysql_connect('localhost', 'root', '1234567890');
mysql_select_db('soporte') or die(mysql_error());
$sql = mysql_query("SELECT id,password FROM usuarios WHERE usuario='$usuario'");
$info = mysql_fetch_array($sql);
if($info['password'] == $password)
{
$id_usuario = $info['id'];
header('Location:consulta.php?id_usuario='.$id_usuario);
#echo '<meta http-equiv="Refresh" content="5;url=usermenu.php">';
} #else echo '<meta http-equiv="Refresh" content="5;url=index.php">';
else{
header('Location:iniciar.php');
}
?>

You might also like