I see no problem with this code, as long as there is a querystring name recordID being passed to the detail page, the session variables will be set, the only sugetion I would make is to add a check for the recordID querystring:
<?php
if (!session_id()) session_start();
if(isset($_GET["recordID"]) && $_GET["recordID"] != "") {
if(!isset($_SESSION["numberone"])) {//if session 'name' hasn't been set
$_SESSION["numberone"] = $_GET["recordID"]; //set session 'name' to a value
}else{
$_SESSION["numberone"] = $_GET["recordID"];
}
if(!isset($_SESSION["numbertwo"])) {
$_SESSION["numbertwo"] = $_GET["recordID"];
}else{
$_SESSION["numbertwo"] = $_GET["recordID"];
}
$rvitem = $_GET["recordID"];//allows me to echo product id in body
}
?>