<?php 

function historique($myFile,$message,$Bsession_id)
{


	//Trouver l'usager
	$sql_usager = "SELECT prenom
	FROM usager
	WHERE bidsession = '$Bsession_id';";
	$result_usager = mysql_query($sql_usager) or die("");
	$row_usager = mysql_fetch_row ($result_usager);
	$nom = $row_usager[0];

	$fh = fopen($myFile, 'a+') or die("can't open file");
	$date = date('Y-m-d H:i:s');
	$stringData = $date."***".$nom."*** ".$message." \r\n";
	fwrite($fh, $stringData);
	fclose($fh);
}




?>
