我正在使用TinyMCE编辑器在我的应用中创建帖子。
点击save
时没有任何反应。
<?php
$title = "Tambah Film";
include 'koneksi.php';
include 'header.php';
if(isset($_POST['submit'])){
$judul = htmlentities($_POST['judul']);
$nama_kat = htmlentities($_POST['nama_kat']);
$nama_tag = htmlentities($_POST['nama_tag']);
$konten = htmlentities($_POST['konten']);
$query = $db->prepare("INSERT INTO `konten`(`judul`,`nama_kat`,`nama_tag`,`konten`)
VALUES (:judul,:nama_kat,:nama_tag,:konten)");
$query->bindParam(":judul", $judul);
$query->bindParam(":nama_kat", $nama_kat);
$query->bindParam(":nama_tag", $nama_tag);
$query->bindParam(":konten", $konten);
$query->execute();
}
$query = $db->prepare("SELECT * FROM tag");
$query->execute();
$data = $query->fetchAll();
$query2 = $db->prepare("SELECT * FROM kategori");
$query2->execute();
$data2 = $query2->fetchAll();?>