Try the next step:
1) For all forms:
replace <form action="" method="post">
to <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES, "utf-8"); ?>" method="post">
2) For all redirect:
$findHttp = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http';
header('Location: '.$findHttp.'://'.$_SERVER["HTTP_HOST"].'/');
exit;
3) Check POST request - var_dump($_POST);
and find current 'if' block which work with that request.