I have PHP page called index.php where I am displaying some data in table. I have action button called Delete from where user can delete record from table like below
<td><center><a href="delete.php?id=<?php echo $apl_installations_row['installation_id'];?>">
<i class="fas fa-times"style="color:red"></i>
</a></center></td>
My delete.php is like below
<?php
session_start();
include_once "../sessioncheck.php";
include_once "config.php";
$user_id = $_SESSION['id'];
$id = (int)$_GET['id'];
$update = $con->prepare("DELETE FROM apl_installations WHERE installation_id = ? AND client_id = ?");
$update->bind_param('ii', $id, $user_id);
$update->execute();
$update->close();
?>
Its opening new page called delete.php and stay on same page after record get delete. I want keep user on same page called index.php or want back on index.php after delete record. Let me know if someone can help me for do it. Sorry I am learning PHP and have not good knowledge of it. Thanks