АП
$sql = 'INSERT INTO posts (post_author, post_date, post_title, post_content, post_status) VALUES (?, ?, ?, ?, ?);';
$stmt = mysqli_stmt_init($connection);
if (!mysqli_stmt_prepare($stmt, $sql)) {
header('Location: ../single.php?error=prepareerror');
exit();
} else {
mysqli_stmt_bind_param($stmt, 'isssi', $author, $datetime, $title, $content, $status);
mysqli_stmt_execute($stmt);
header('Location: ../single.php?single=success');
exit();
}