<?php

	$user = "root";
	$password = "";
	$host = "localhost";
	$db = "test";
		
	$db_connection = mysql_connect($host, $user, $password);
	mysql_select_db($db, $db_connection); 
	
	if(!$db_connection)
	{
		die('Could not connect: ' . mysql_error());
	}

	$nom = "blase";
	$prenom = "moi";
	
	$sql = "SELECT * FROM reservation"; //and prenom LIKE '.$prenom.'"; 
	$retour=mysql_query($sql);
	$count = mysql_num_rows($retour);	
	echo $count;

	//$sql = "SELECT nom FROM reservation where nom = blase"; //and prenom LIKE '.$prenom.'"; 
	$sql="SELECT * FROM reservation WHERE nom = '".$nom."' AND prenom = '".$prenom."' ";
	$retour=mysql_query($sql);
	$count = mysql_num_rows($retour);	
	echo $count;
	
	//$data = mysql_fetch_assoc($retour);
	//$data = mysql_fetch_array($sql);
	$data = mysql_fetch_array($retour);
	//echo $sql;
	print_r($data);
	var_dump($data);
	
	//$retour_messages=mysql_query($sql);
	
	//$datas = mysql_fetch_assoc($retour_messages
	
?>

