rendered paste body<?php require_once ('config.php'); $champ1 = 'Produits'; $champ2 = 'Prix'; /* fonctionne pas */ $req_table = "CREATE TABLE my_products ( id mediumint(9) NOT NULL auto_increment, ".$champ1." TEXT NOT NULL, ".$champ2." TEXT NOT NULL, KEY id (id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 )"; echo($req_table); mysql_query($req_table); /* fonctionne */ mysql_query(" CREATE TABLE my_products ( id mediumint(9) NOT NULL auto_increment, $champ1 text NOT NULL, $champ2 text NOT NULL, KEY id (id) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 "); $produits = 'iPhone'; $prix = '399'; $req_prod = "INSERT INTO my_products ($champ1,$champ2) VALUES('$produits','$prix')"; mysql_query($req_prod); mysql_close();?>