how did you have it linking to the menu.php page before?
perhaps it would help to see a copy of the details page the way it was set up before to get a better understanding of the code.
Ultimately, I think CraigR suggestion of storing the query string in a sesion may be the best way to go.
add the following on the detail page:
$_SESSION['detailsID'] = $_GET['detailsID'];
then change the record set on menu.php to use the session variable instead of the query string variable.