0
if (isset($_SESSION['logged_in'])) {
if (isset($_POST['title'], $_POST['content'])) {
    $title = $_POST['title'];
    $content = $_POST['content'];

    if (empty($title) or empty($content)) {
        $error = 'All fields are required!';
    } else {
        $query = $pdo->prepare("INSERT INTO articles (atricle_title, atricle_text, atricle_timestamp) VALUES (?, ?, ?)")

        $query->bindValue(1, $title); //error is here
        $query->bindValue(2, $content);
        $query->bindValue(3, time());

        $query->execute();

        header(Location: index.php);
}

誰かがここで何が問題なのか知っていますか?. コード自体はそれ以上ですが、これは関連する部分にすぎません。

ありがとう。

4

4 に答える 4