在上面的代码中,我试图在变量 $image_result 中捕获 idnum 的值,但无济于事。任何帮助将不胜感激
echo "<select name='myitem' id='myitem' action='post>";
while($row = mysql_fetch_array($result1)){
echo "<option value='".$row["idnum"]."' data-image='/components/com_aclsfgpl/photos/p".$row["idnum"]."n1.jpg'>".$row["title"]."</option>";
}
echo "<option value='". $row['idnum']."'>".$row['title']. '</option>';
echo "</select>";
$image_result=$_POST['myitem'];