<?php

$email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL);
$senha  = filter_var($_POST['password'], FILTER_SANITIZE_STRING);

$sel_cli = mysql_query("SELECT * FROM clientes WHERE email='$email' AND senha='$senha'");


if(mysql_num_rows($sel_cli)>0){


  $cliente = mysql_fetch_assoc($sel_cli);
  $_SESSION['ncliente']['id']    =    $cliente['id'];
  $_SESSION['ncliente']['login'] = $cliente['email'];
  $_SESSION['ncliente']['senha'] = $cliente['senha'];

  echo 1;

}else{

	$_SESSION['ncliente']=array('id'=>'','login'=>'', 'senha'=>'');
	echo 0;


}









