<?php
	include 'connection.php';

	$postTitle = $_POST['title'];

	$sql = "INSERT INTO items (i_title) VALUES ('$postTitle')";

	if (mysqli_query($conn, $sql)) {
			echo json_encode(array("statusCode"=>200));
		} 
		else {
			echo json_encode(array("statusCode"=>201));
		}
		mysqli_close($conn);

	mysqli_close($conn);
?>