You have the following SQL statement that takes 3 parameters:
$inserir = $pdo->prepare("INSERT INTO `posts` SET `titulo` = ?, agendado = ?, status = ?");
but you have no code to set the values in those statements through any SQL parameters. You are basically inserting nothing into the database because of it.
I don't do PHP, but it seems you're not even declaring the parameter positions correctly, namely using "?" to denote them instead of using named parameters, like ":name", ":cost", ...
See the PHP documentation for
PHP: Prepared statements and stored procedures - Manual[
^]