<?php
include("../conexao.php");
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['caminho'])) {

    $ct_pasta_de_videos = "CREATE TABLE IF NOT EXISTS `pasta_de_videos` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `caminho` text,
    `id_tabela_digital_programacao` int(11) DEFAULT NULL,
    `rodou` tinyint(1) DEFAULT '0',
    PRIMARY KEY (`id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1";
    
    mysqli_query($con,$ct_pasta_de_videos);

    $caminho = $_POST['caminho'];
    $stmt = $con->prepare("INSERT INTO pasta_de_videos (caminho) VALUES (?)");
    $stmt->bind_param("s", $caminho);
    $stmt->execute();
    $stmt->close();
}
$con->close();
?>
