include "config.php";
$id = $_GET['id'];
$data = mysql_query("select*from orders where orderID=$id");
while ($dat = mysql_fetch_array($data)) {
echo "<input type=hidden name=orderID value=$dat[0]>";
}
?>
</br>
Product : <select name="productID">
<option value="0">-product name-</option>
<?php
$goods = mysql_query("SELECT * FROM products");
while ($data = mysql_fetch_array($goods)) { ?>
<option value="<?php echo"$data[productID]"; ?>"><?php echo"$data[productName]"; ?></option>
</select>
</br>
Price :<input type="text" name="Price" value="<?php echo"$data[unitPrice]" ?>" disabled="disabled"></br>
<?php } ?>
Qty : <input type="text" name="Quantity"></br>
<input type="submit" value="submit">
当我们选择 productID 时,我不知道如何自动显示价格。
谁能帮我?