<?php

	session_start ();

	include('database.php');
	DB_connexion(); 
	
	header( 'content-type: text/html; charset=utf-8' );

	$client = $_POST['client'];
	$password = $_POST['password'];
	
//	$client = "DELPY Patrice";
//	$password = "aqwzsx";
	
	$pieces = explode(" ", $client);	
	$nom = $pieces[0]; 	
	$prenom = $pieces[1];
	
	mysqli_query($connexion, "SET NAMES 'utf8'");
	$sql = "SELECT * FROM client WHERE nom ='$nom' and prenom ='$prenom' ";	
	$result = mysqli_query($connexion, $sql );	
	$data = mysqli_fetch_assoc($result);
	
	//echo $data['password'];
	
	if($password == $data['password'])
	{
		echo "yes";
	}
	else
	{
		echo "no";
	} 
	
	
	//if($client == "BORDES Laurent" && $password == "azer")
	
	
	
?>