Sorry about that. Here are the samples. Some unrelated code has been snipped for brevity.
HTML form page looks like this:
<?php include("...");
$return=$_SERVER['SCRIPT_URI']; ?>
The following main menu items are as follows:<br/>
<?php List_Menu_Items(); ?>
<br/>
Choose from the following main menu options:<br/>
<table>
<form method='post' action='/php/menu/Add_Menu.php'>
<input type='hidden' name='return' value='<?php echo "$return";?>'>
<tr>
<td>
Add the following Menu Item:
</td>
<td>
<input type='text' name='Menu_Name'>
</td>
</tr>
</form>
<form method='post' action='/php/menu/Delete_Menu.php'
<input type='hidden' name='return' value='<?php echo "$return";?>'>
<input type='hidden' name='bubba' value='<?php echo "$return";?>'>
<tr>
<td>
Delete Menu Item:
</td>
<td>
<select name='Menu_Number' size='1'>
<?php Menu_Options();?>
</select>
</td>
<td>
<input type='submit' value='Delete'>
</td>
</tr>
</form>
</table>
The PHP form (Delete_Menu.php) has the following code:
<?php
include("/usr/local/apache2/htdocs/php/menu/menu.php");
$Menu_Number=$_POST['Menu_Number'];
$return=$_POST['return'];
$bubba=$_POST['bubba'];
$connection=Connect_To_DB();
$delete="delete from Main_Menu
where Menu_Number='$Menu_Number'";
$result=mysql_query($delete)
or die("Delete from Main_Menu table had errors.");
mysql_close($connection);
echo "<meta http-equiv='refresh' content=0;URL='$bubba'>";
?>
The $return variable is a common name I have used throughout all my programming at work. This is simply the return path that the script page returns to, after it has done its work.
For some reason, in the second form, the return variable does not pass to the PHP form. When looking at the source code on the form page, the syntax is correct. When passing it to the PHP page, however, it's as if the variable was never set.
Most bizarre...