This:
$addshort = $conn->query("INSERT ...')");
^^^^^^^
if ($conn->query($addshort) === TRUE) {
^^^^^
$addshort
is your query result/handle/object, which you then try to EXECUTE AGAIN, which doesn't work. query()
expects an SQL string, and you're passing in an object.
And on top of that, you're vulnerable to sql injection attacks.