I wrote a query to put records in a table and at the same time create another. The table is created but the data is not entered. Where am I wrong? This is my code:
$sql = "INSERT INTO progetti
                    (data, ora, nome_progetto, anagrafica_id, preventivo, budget, eurora, scadenza, scontoaggiuntivo, ref1, tel_ref1, mail_ref1, contenuto, stato_id)
                    VALUES
                    ('".$_POST["data"]."',
                    '".$_POST["ora"]."',
                    '".$_POST["nome_progetto"]."',
                    '".$_POST["anagrafica_id"]."',
                    '".$_POST["preventivo"]."',
                    '".$_POST["budget"]."',
                    '".$_POST["eurora"]."',
                    '".$_POST["scadenza"]."',
                    '".$_POST["scontoaggiuntivo"]."',
                    '".$_POST["ref1"]."',
                    '".$_POST["tel_ref1"]."',
                    '".$_POST["mail_ref1"]."',
                    '".$_POST["contenuto"]."',
                    '".$_POST["stato_id"]."'
                    )";
                    "CREATE TABLE $_POST[nome_progetto] (
                      id INT(11) AUTO_INCREMENT PRIMARY KEY,
                      data date,
                      intervento varchar(30),
                      descrizione varchar(70),
                      ore int(2)
                    )";
 
    