
	
<?php

	 session_start();
	 
	 if($_SESSION['database']=="local")
	  {
	     $db_host    = "localhost";
	     $db_user   = "root";
	     $db_pass   = "";
     	     $db_name   = "boutique";

	 }
	
	if($_SESSION['database']=="public")
	  {
  	     $db_host    = "sql2";
   	     $db_user   = "analogde";
 	     $db_pass   = "rainbow";
    	     //$db_type   = "mysql";
	     $db_name   = "analogde";
	 }

	 $ch1 = "TITRE aaaa";
	 $ch2 = "Consommation" ; 
	 $ch3 = "Types de programmes"; 
	 $ch4 = "TITRE bbb";
	 $ch5 = "Programmateur"; 
	 $ch6 = "Classe énergétique"; 
	 $ch7 = "TITRE ccc";
	 $ch8 = "Dimensions"; 
	 $ch9 = "Poids"; 

	 $trame= $ch1 ."," .$ch2 ."," .$ch3 ."," .$ch4 ."," .$ch5 ."," .$ch6 ."," .$ch7 ."," .$ch8 ."," .$ch9  ;
	 $trame = addslashes($trame);

			  
	 $connexion = mysql_connect($db_host,$db_user,$db_pass); 
	 mysql_select_db($db_name, $connexion);
			  
	 $element = "lave_linge";			  
			  
         $sql = "UPDATE categorie SET descriptif = '$trame'  WHERE table_article = '$element' ";
 	 $requete = mysql_query($sql);
		 
		  
	 //$sql = "INSERT INTO descriptif( id, template, datas)  VALUES('', '$identifiant', '$chaine')"; 
 
	
	 // relecture pour le debug
	$sql = "SELECT * FROM categorie WHERE table_article = '$element' ";
 	$requete = mysql_query( $sql, $connexion ) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error()); 
	$result = mysql_fetch_assoc($requete);
	echo($result['descriptif']) ;

?>
	