Like Ian said, make sure that the insert code block comes after the recordset code block, in the redirect, you are using a recordset value not a querystring value.
you don't post the recordset code, but I'm guessing you have the recordset using the querystring variable for filtering. Bear in mind that when you submit a form, you are reloading the page. If the page requires a querystring variable when it loads initially, you will need to include that querystring variable as a part of the forms action.
in the form tag, use the following code for the action:
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".htmlspecialchars($_SERVER["QUERY_STRING"]):""; ?>"
this will automatically include any query string variable that is used to load the page when the page is submitted.