Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 18 lines (11 sloc) 325 Bytes
<?php
include "models/post_handler.php";
$config = include("db/config.php");
$db = new PDO($config["db"], $config["username"], $config["password"]);
$post = new PostHandler($db);
$result = $post->insert(array(
content => $_POST["content"]
));
header("Content-Type: application/json");
echo json_encode($result);
?>