In order to isolate where my problem was occurring, I generated an echo of the $qction value first thing on the destination page and it was always displaying the value from the bottom (last) set of the variable in the menu.
<?php
include 'http://www.magnoliasociety.org/collection_db_folder/db_connect.inc';
include 'http://www.magnoliasociety.org/collection_db_folder/functions.inc';
session_start();
session_register("logged_in");
session_register("grdnno");
session_register("grdnname");
session_register("treeno");
session_register("treename");
session_register("selectgarden");
session_register("selecttree");
session_register("result");
// Has user logged in?
if (!$logged_in == 'Y')
{
Header('Location: http://www.magnoliasociety.org/collection_db_folder/access/collection_db_ndx.php?target="_top"');
exit;
}
// Register $formVars
If (!session_is_registered("formVars"))
{
session_register("formVars");
$formVars = array();
}
// Register an Error Array
If (!session_is_registered("errors"))
{
session_register("errors");
// Clear any errors that may have been found previously.
$errors = array();
}
If (empty($errors))
// first time thru
{
include 'http://www.magnoliasociety.org/collection_db_folder/db_connect.inc';
include 'http://www.magnoliasociety.org/collection_db_folder/grdn_profile/access_garden_profiles.inc';
}
// load garden number and garden name
$formVars["garden_number"] = $row["garden_number"];
$formVars["garden_name"] = $row["garden_name"];
// line 49
?>
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win">
<META NAME="description" CONTENT="a worldwide organization devoted to the
appreciation and study of magnolias">
<META NAME="keywords" CONTENT="Bull Bay, Sweet Bay, Magnolia Society,
saucer magnolia, tulip magnolia, michelia">
<TITLE>Member's - select a tree</TITLE>
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args+".location='"+args[i+1]+"'");
}
//-->
</script>
<style type text/css">
<!--
form {margin:0;}
-->
</style>
</HEAD>
<BODY BGCOLOR="#ffffff">
<table width="550" border="1" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="1">
<tr>
<td valign="top">
<p align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="3">
<br>
<?PHP
switch($action)
{
case "A":
echo "<b>Identify the Tree which you want to <font color='#911B79'>ADD</font>.</b>";
break;
case "U":
echo "<b>Identify the Tree which you want to <font color='#911B79'>UPDATE</font>.</b>";
break;
case "D":
echo "<b>Identify the Tree which you want to <font color='#911B79'>DELETE</font>.</b>";
break;
default:
echo "<b>Identify the Tree which you want to <font color='#911B79'>VIEW</font>.</b>";
break;
}
?>
</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="-3">Membership
Number: <b>
<?PHP echo "$mbrno"; ?>
</b> <br>Your Name: <b>
<?PHP echo "$mbr_name_remainder $mbrname"; ?>
</b> </font><br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="-2">
Identification Number for your Garden:
<?PHP
switch($row_count)
{
case "1":
$row = mysql_fetch_array ($result)
or die ("Not able to access Garden Profile data.");
$grdnno = $row["garden_number"];
$grdnname = $row["garden_name"];
echo "<b>$grdnno</b>";
break;
case "0":
echo "<font color=RED><b>You must establish a Garden Profile on the database prior to working with your trees.<br>See the menu at the left.</b></font>";
break;
default:
$grdnno = NULL;
echo "<font color=RED><b>You have more than one garden profiled.<br>Please select a Garden Profile from the list below.</b></font>";
break;
}
// line 142
?>
<br>
Name of your Garden:
<? If ($row_count <> 1)
echo "<b>$grdnname</b>";
?>
</font></p>
</td>
</tr>
</table>
<?
// If more than one Garden has been profiled, provide form to member to select desired Garden. Then use selected garden number to display list of trees.
// If (($HTTP_GET_VARS['Submit Garden Selection']<>'submit') AND
If ($row_count > 1)
{
include 'http://www.magnoliasociety.org/collection_db_folder/tree_profile/get_garden_number.inc';
If ($HTTP_GET_VARS['Submit Garden Selection']=='submit')
$grdnno = $HTTP_GET_VARS['selectgarden[0]'];
include 'http://www.magnoliasociety.org/collection_db_folder/tree_profile/get_tree_number.inc';
}
elseif (($HTTP_GET_VARS['Submit Garden Selection']=="submit") OR
($row_count == 1))
{
include 'http://www.magnoliasociety.org/collection_db_folder/tree_profile/get_tree_number.inc';
}
?>
<table width="100%">
<tr>
<td>
<div align="center">
<p><a href="../../index.html" target="_top"><font size="4"><br>
Return to Home Page</font></a></p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</BODY>
</HTML>