Most likely, the forms action does not pass the querystring when the form is submitted, so there is no origianl querystring for the redirect to pass.
try changing the forms action to:
action="<?php echo ($_SERVER["PHP_SELF"].(isset($_SERVER["QUERY_STRING"])?"?".htmlentities($_SERVER["QUERY_STRING"]):""));?>"
so that the query string will be part of the form post.