Thanks. I will need to work through this. Let me ask you what may be a dumb question. I will have two recordsets per page. One that sorts the page to the right category and then one that will get the options. Even though I highlight the first recordset, I cannot determin in the code where one stops and the other begins in order to insert the get code you gave me.
Here is the code that highlights when either is selected. If you could indicate at what point I need to insert the " <?php
$_GET['tempitemid'] = $run_rsfrozen['itemid'];
?> " that would be great.
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_aysconn, $aysconn);
$query_rsfrozen = "SELECT * FROM items WHERE itemcatid = '9'";
$rsfrozen = mysql_query($query_rsfrozen, $aysconn) or die(mysql_error());
$row_rsfrozen = mysql_fetch_assoc($rsfrozen);
$totalRows_rsfrozen = mysql_num_rows($rsfrozen);
$param_rsfoptions = "0";
if (isset($run_rsfrozen['itemid'])) {
$param_rsfoptions = (get_magic_quotes_gpc()) ? $run_rsfrozen['itemid'] : addslashes($run_rsfrozen['itemid']);
}
mysql_select_db($database_aysconn, $aysconn);
$query_rsfoptions = sprintf("SELECT * FROM options INNER JOIN items on items.optid=options.optgrpid WHERE items.itemid=%s", GetSQLValueString($param_rsfoptions, "int"));
$rsfoptions = mysql_query($query_rsfoptions, $aysconn) or die(mysql_error());
$row_rsfoptions = mysql_fetch_assoc($rsfoptions);
$totalRows_rsfoptions = mysql_num_rows($rsfoptions);
?>