if(isset($_POST["ok"]))
{
add_obj($_SESSION['id']);
echo 'lol';
}
<form name = 'newForm' id="newForm" method="post">
<input type="submit" name="ok" value="Принять" onclick="document.getElementById('newForm').submit()">
</td>
</form>