$home = "f"; } if (isset($_POST["prodotti"]) and $_POST["prodotti"] == "t") { $prodotti = "t"; } else { $prodotti = "f"; } $foto = new Foto(); if (isset($_POST["insert"]) and $_POST["insert"] == "si") { $foto->add($titolo, $titolo_ita, $titolo_ted, $home, $prodotti); //recupero l'ultimo id inserito $db = new Db(); $id = $db->get_last_id(); } elseif (isset($_POST["update"]) and $_POST["update"] == "si") { $id = aggiusta_post($_GET["id"]); $foto->update($id, $titolo, $titolo_ita, $titolo_ted, $home, $prodotti); //upload dei file update_file("foto", "foto_dettaglio.php?errore=file&id=" . $id, $id); } print "<script language='Javascript'>window.location.replace('foto_dettaglio.php?id=" . $id . "&ins=si');</script>"; } $titolo = ""; $titolo_ita = ""; $titolo_ted = ""; $home = ""; $prodotti = ""; if (isset($_GET["id"]) and $_GET["id"] != "") { $id = aggiusta_post($_GET["id"]); $titolo = $array["ft_titolo"]; $titolo_ita = $array["ft_titolo_ita"]; $titolo_ted = $array["ft_titolo_ted"];