<?php
	
	$id=$_GET['id'];
	
	$db_type   = "mysql";
		$db_user   = "analogde";
		$db_pass   = "rainbow";
		$db_name   = "analogde";
		$db_host    = "sql2";
		
		$connexion = mysql_connect($db_host,$db_user,$db_pass); 
	
	//$connexion = mysql_connect("localhost", "root", "");
        if(!$connexion)
          { die('Could not connect: ' . mysql_error());
          }
        
        $db = mysql_select_db($db_name,$connexion); 
        
        //mysql_select_db("boutique", $connexion);
        
        $requete = "SELECT * FROM lave_linge WHERE modele='$id'";
	$result = mysql_query($requete);
	
	$ligne = mysql_fetch_array($result, MYSQL_NUM);
	$prix =  $ligne[10];
	
	
	
	echo" <form action=\"new_panier.php?action=add\" method=\"post\">
		$id:   Choisir la quantité :
 	      <input type=\"text\" name=\"qte\" size=\"2\" maxlength=\"2\" value=\"1\"/>
    	      <input type=\"submit\" value=\"Commander\" /> 
  	      <input type=\"hidden\" name=\"id\" value=\"$id\" />
 	      <input type=\"hidden\" name=\"prix\" value=\"$prix\" />
    	      <input type=\"hidden\" name=\"designation\" value=\"Lave linge\" />";
	echo"</form>";

?>