几天来我一直在尝试这样做,但我似乎无法让它发挥作用。我想根据用户选择的鞋码更改价格。但我需要知道 checkout.php 上选择的尺寸。我的 checkout.php 已经在工作,但我需要获得尺寸以及该尺寸的奖品。在选择的选项中,我指出了价格和价格的大小。请帮忙。
<div class="content_half float_r">
<form id="add2cart" name="cart" method="Post" action="<?php fetchdir($bpages); ?>cart.php">
<table>
<tr>
<td width="160">Price:</td>
<td name="price" id="price"><?php echo $row ['Start_Cost']; ?></td>
</tr>
<tr>
<td for="size" width="160">size*:</td>
<td>
<select name="size" class="small" id ="size">
<option value="">12 size</option> // the price tag already have the start_Cost for this size
<option value="">14 size(£30.00)</option>
<option value="">16 size(£35.00)</option>
<option value="">18 size(£40.00)</option>
<option value="">20 size(£45.00)</option>
<option value="">22 size(£55.00)</option>
<option value="">24 size(£60.00)</option>
<option value="">26 size(70.00)</option>
<option value="">28 size(£80.00)</option>
</select>
</td>
</tr>
<tr>
// you choose size
<td> size: // the size the person choose will go down here
</td>
</tr>
<tr>
<td>Quantity</td>
<td><input type="text" name="Qty" value="1" style="width: 20px; text-align: right" /></td>
</tr>
</table>
<div class="cleaner h20"></div>
<input type="hidden" name="pid" id="id" value="<?php echo $id; ?>" />
<input type="Submit" class="button" name="button" id="button" value="Add to shopping cart"/>
</form>
</div>