<?php

session_start();


 	
    		/* Initialisation du panier */
    		$_SESSION['panier'] = array();
    		
    		
    		/* Subdivision du panier */
    		$_SESSION['panier']['id'] = array();
    		$_SESSION['panier']['qte'] = array();
    		$_SESSION['panier']['designation'] = array();
    		$_SESSION['panier']['prix_ttc'] = array();
		$_SESSION['panier']['prix_ht'] = array();
		
		
		

		$select['id'] = 0;
	      	$select['qte'] = 5;
		$select['designation'] = "DVD";	
		$select['prix_ttc'] = 6564;
		$select['prix_ht'] = 6231;
		ajout($select); 
		
		
		
		/*$select['id'] = 1;
	      	$select['qte'] = 2;
		$select['designation'] = "Plasma";	
		$select['prix_ttc'] = 1125;
		$select['prix_ht'] = 928.89;
		ajout($select); 
		
		$select['id'] = 1;
	      	$select['qte'] = 2;
		$select['designation'] = "Laptop Sony";	
		$select['prix_ttc'] = 449;
		$select['prix_ht'] = 401.10;
		ajout($select); */
		
		$_SESSION['email']= "patrice.delpy@sfr.fr";
		
		
		
		 
		$_SESSION['frais_livraison']= 7.10;
		$_SESSION['transporteur']= "Express";
	   	
		
		var_dump($_SESSION['panier']);
		
		var_dump($_SESSION['frais_livraison']);
		
		echo" <form action=\"../commande/recapitulatif.php\" >
		
    	      <input type=\"submit\" value=\"Commander\" /> ";
	echo"</form>";





?>

<?php

function ajout($select)
{
    array_push($_SESSION['panier']['id'],$select['id']);
    array_push($_SESSION['panier']['qte'],$select['qte']);
    array_push($_SESSION['panier']['designation'],$select['designation']);
    array_push($_SESSION['panier']['prix_ttc'],$select['prix_ttc']);
    array_push($_SESSION['panier']['prix_ht'],$select['prix_ht']);
} 

?>