<?php

session_start();
require_once '../file-includes.php';
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$info = array();
$info[] = fix_string($request->task);
$info[] = fix_string($request->importance);
$info[] = (string) date('d-m-Y');
$info[] = '-';
$userID = get_userID_session();
add_task($info, $userID);
<?php

session_start();
require_once "../file-includes.php";
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$contact_id = fix_string($request->contactID);
$userID = (int) get_userID_session();
delete_contact($contact_id, $userID);