Exemplo n.º 1
0
<?php

require_once __DIR__ . "/../config.php";
require_once __DIR__ . "/../DBModify.php";
$title = $_POST['title'];
$text = $_POST['text'];
$date = $_POST['date'];
$AddNews = new DBModify(SERVER, USER, PASS, DB);
if ($AddNews->insertDB(DB_NAME, "title, text, date", "'{$title}', '{$text}', '{$date}'")) {
    header("Location: /News_OOP/index.php");
}