API POST to save a new item in a Database via PHP & MYSQLI
What are these lines all about?

$thread = $con-&gt;thread_id;
$con-&gt;close();
$con-&gt;kill($thread);
$con = null;


it seems a bit, sorry for the pun, overkill. According to the PHP manual this should do just fine:

$con-&gt;close();


but even if you leave it out, the connection will be closed automatically when the script terminates. See:

http://php.net/manual/en/mysqli.construct.php

read the examples, and see:

http://php.net/manual/en/mysqli.close.php