如何從一個選擇選項值中獲取多個值。 這裏有一個例子,從一個選擇選項值中獲取多個值。 PHP HTML
<html>
<form method="post" action="#">
<select name="retrive_destination">
<?php while($row = mysql_fetch_assoc($result)){
$destinationID = $row['destinationID'];
$destination_place = $row['destination_place'];
echo '<option value="'.$destinationID.'">'.$destination_place.'</option>
?>
<input type="submit">
</select>
</form>
</html>
我如何獲得這兩個值「$目標-ID」和一個選項值「$ destination_place」,當我提交表單,因爲我需要兩個值,當用戶選擇的一個選項下一步。謝謝你們的歡呼聲。
這是我正想作爲回答,你可能想要包括前者plode聲明以及如果他不知道如何使用它。 – steinmas
也在$ destination_place'「>' – SajithNair
之間加一個點作爲建議編輯答案 –