I m new on php stuff so execuse me for any confusing terms.
I have a form on a page with a button that once clicked it pops up another sub page:
If you want to redirect the main page on a button click in the popup, you need to do this with JS, not PHP.
Add this to the button in the popup:
From a popup, you can access the page/window that opened the popup with:
window.opener. This means that you also can call functions on the main page: