<?php

	session_start();
	
	$_SESSION['database']="local";
	
	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";
	 }
	 
	 
	 $connexion = mysql_connect($db_host,$db_user,$db_pass); 
	 		mysql_select_db($db_name, $connexion);
	 
	 $nom_categorie = "proto";
	 
	 $requete = " CREATE TABLE $nom_categorie (
  		id tinyint(4) unsigned NOT NULL AUTO_INCREMENT,
  		id_catalogue varchar(20) NOT NULL,
  		designation varchar(50) NOT NULL DEFAULT '',
  		reference varchar(20) NOT NULL,
  		marque varchar(20) NOT NULL,
  		fournisseur varchar(20) NOT NULL,
  		dispo varchar(20) NOT NULL,
  		prix_ttc decimal(7,2) NOT NULL,
  		prix_ht decimal(7,2) NOT NULL,
  		remise decimal(7,2) NOT NULL,
		tva decimal(5,2) NOT NULL,
  		descriptif blob NOT NULL,
  		stock varchar(20) NOT NULL,
  		status varchar(20) NOT NULL,
  		rem blob NOT NULL,
  		heure varchar(20) NOT NULL,
		date varchar(20) NOT NULL,  
  	 	PRIMARY KEY (id) ) ";
	       
		mysql_query($requete);	    
		
		
		$p1 = "INSERT INTO $table (id, id_catalogue, designation, reference, marque, fournisseur, dispo, prix_ttc, prix_ht,
		 remise, tva, descriptif, stock, status, heure, date,";
	 		
		
	 
	 
?>	 