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);
}
Someone knows what's the problem here?. The code itself is more then that, but this is to only relevent part.
Thanks.