Hello, I need to do so that when you click on the button, the request is processed and does not go to another page. That is, as in the VC, for example, when you press a button.
html script:
<span style="display: none;" id="idGroups"><?php echo $hfs["idGroups"]; ?></span> <button name="delgroup" id="delgroup">Удалить</button> php script:
<?php include("connectdb.php"); $id = $_POST["idgroup"]; if ($_POST['delgroup']!=null) { $delgroup = mysql_query("DELETE FROM groups WHERE id='$id'"); echo "Группа была успешна удалена. "; } else { echo "Ошибка. Группа не удалена!"; } ?>