@@ -81,7 +81,6 @@ $app->map(['GET', 'POST'], '/blog/create', function (Request $request, Response | |||
global $db; | |||
$insertQuery = "INSERT INTO blogs (slug, title, content) VALUES ('" . $data['slug'] . "', '" . $data['title'] . "', '" . $data['content'] ."')"; | |||
$db->exec($insertQuery); | |||
$_SESSION['blogs'][] = ["slug" => $data['slug'], "title" => $data['title'], "content" => "Lorem ipsum 4"]; | |||
return $response->withHeader('Location', '/')->withStatus(302); | |||
} | |||
} else { |