How to prevent double insertion

I have a web page that allows user to enter data, data is saved and the next page displays the data in a table with several records. Each record has delete link. When user click the delete link, a popup window is displayed and PHP code deletes the record using record id that passed with the delete link. Then I use JavaScript code in the popup to refresh parent page and remove deleted record and close popup. Deleting is working correctly. Correct record deleted and parent page refreshed. The problem is that when parent page is refreshed the record is inserted again because the parent page still holds variables with data from previous insertion.
How to prevent double insertion. Using redirect would be great, but to display parent page after insertion record I need to have some pass to the page parameters.
if I write header("Location=“mypage.php” ) I will loose these parameters and I need them to display correct data on the page.
Is there a way to save parameters and use them with redirect?

You could save the id as a session value or use a GET field when using the

header("location: mypage.php?id=".$id);
exit;

Thank you. It helps.