Hello. Page gets id GET
$id = intval($_GET['itemid']);
This $ id in some pieces of code is visible in others is not visible. There are no functions on the page. Before the announcement, tried to do global, still not visible in some places. I read the manual and other sources, there is no reason for invisibility. For example, this simplest command is not executed:
if($_POST['deleteitem']){ pg_query($dbconnect,"DELETE FROM items WHERE id = '$id'"); }