OK, I should have been a bit more specific regarding the isset (better to use than empty on its own) and I would normally have a hidden input field in my forms to check that the form has been posted, so something like
if (!isset($_POST['confirm_login'])) {
...
}
I am not 100% sure I understand your question but I think you are trying to pass a parameter back to the login page if the person is redirected (maybe an error code), so:
if (!isset($_POST['confirm_login'])) {
header('location: loginPage.php?error=1');
}
I could help better if you could tell me exactly what information you want to send back to the login page on the header re-direct.