echo "<form action='index.php' method='POST'>
<a href='index.php?post_delete=".$in['id']."'><input type='submit' name='delet' value='удалить'></a>
</form>";
$post_id = $_GET['post_delete'];
if(isset($_POST['delet'])) {
mysqli_query($connect_db, "DELETE FROM `articles` WHERE `id` = $post_id");
}
echo "<form action='index.php' method='POST'>
<input type='hidden' name='data' value='".$in['id']."'>
<input type='submit' name='delet' value='удалить'>
</form>";
if(isset($_POST['delet'])) {
$post_id = $_POST['data'];
mysqli_query($connect_db, "DELETE FROM `articles` WHERE `id` = $post_id");
}