Hi all,

My original email seems to have got cut short in transmission so
trying a repost

I need the expertise of you php/mysql gurus yet again.

I have a page that contains the following code

<snip>
<? session_start();
session_register ("source_table","destination_table")?>

</snip>

On the same page I have the following code to put up 2 select boxes

<snip>

// create SQL statement
$sql = "SELECT *
  FROM tabnames ORDER BY table_id";

// execute SQL query and get result
$sql_result = mysql_query($sql,$db)
  or die("Couldn't execute query.");

print "<select name='destination_table'>\n";
while ($row = mysql_fetch_array ($sql_result)) {
  print "<option value='" . $row["system_name"];
 // print "<option value='" . $row["table_id"];
  print "'>" . $row["table_name"] . "</option>\n";
}
print "</select>\n";



?>
       <div align="center"></div></td>
     <td><?

// create SQL statement
$sql = "SELECT *
  FROM operations ORDER BY op_id";

// execute SQL query and get result
$sql_result = mysql_query($sql,$db)
  or die("Couldn't execute query.");

print "<select name='op_id'>\n";
while ($row = mysql_fetch_array ($sql_result)) {
  print "<option value='" . $row["op_id"];
  print "'>" . $row["operation"] . "</option>\n";
}
print "</select>\n";

On another page I have the following value checking code

<?session_start();?>

<?
echo "$source_table;
echo "------";
echo "$destination_table";
?>

and this always returns the same value (the first in table tabnames)
whatever is chosen in the select boxes.

However, if I copy the table tabnames to say tabnames2 and use that
table for the source of the second select box everything works.

Is there a problem with using the same table source on a form for
more than one selection box?

regards

Melanie






____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:wdvltalk-join@;lists.wdvl.com
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to