我有三个桌子和两个下拉框。我填充了两个表并将其值输入到下拉框中。现在,我想从两个下拉框中选择一个值,并将它们的值放入第三个下拉框中。
<fieldset>
<legend>New Cast</legend>
<table>
<form action="04castdb.php" method="post">
</fieldset>
<?php
$query = "select * from dbhx_movie";
$result = mysql_query($query);
if(!$result)
{
die("query failed");
}
echo "<select name='movie'>";
while($row = mysql_fetch_array($result))
{
echo "<option value='$row[pk]'>$row[name]</option>";
}
echo "</select>movie</br>";
echo "<select name='actor'>";
$query = "select * from dbhx_actor";
$result = mysql_query($query);
if(!$result)
{
die("query failed");
}
while($row = mysql_fetch_array($result))
{
echo "<option value='$row[pk]'>$row[surname]</option>";
}
echo "</select>actor</br>";
echo "<input type='submit' value='swag'/>";
?>
</table>
</fieldset>
这是我用来填充下拉框的代码。但是当我按下提交时,它不会从所选值中输入数据。任何人都可以理解它吗?