I have table which are going in different pages and all row have one attribute which is button and button is used for deleting row from table and when button function performed , it is going in header action , but when it is performed in second page after completing action header is sending it in first page , i want it should stay in same page. How can i do this?

Here is some code 

```
<?php
if(isset($_GET['index_edit_id']))
{
    $delete_id=$_GET['index_edit_id'];
    $sql = "DELETE FROM update_table WHERE  id='$delete_id';UPDATE files SET show_status=null  WHERE id='$delete_id';DELETE FROM callcase WHERE id='$delete_id';DELETE FROM lettercase WHERE id='$delete_id'";
    $run=mysqli_multi_query($con,$sql);
    header("location:index.php");
}
?>

```

I want to send location with pagination number and if it is with search key then it should also take all passable situation , should i store key and pagination number in session . Help me please