<?



$email = $_POST['email'];

$password = $_POST['password'];



include 'concha.php';



mysql_connect("$host","$usuario","$contra");



mysql_select_db ("$basedatos");



$sql = "SELECT * FROM `usuarios` WHERE `email` LIKE '$email' LIMIT 1";



$consulta = mysql_query ($sql);



while ($row = mysql_fetch_array($consulta))



{

$usuario = $row["usuario"];

$pass = $row["pass"];







if ($password == $pass) {



mysql_db_query("$basedatos","



UPDATE sesiones SET user = '$usuario';



");





} else { echo "Datos Incorrectos"; exit;};







}



mysql_free_result($consulta);





header('Location: index.php');

exit;

?>



