我有一个在审查阶段效果很好的表格。我想做的不是增加价格来混合。说我有这样的下拉菜单
<select name="DriverShaft" class="select">
<option value="" selected="selected">Select Shaft</option>
<option value="LE- light weight graphite weakest flex">LE- light weight graphite weakest flex</option>
<option value="LW- Light weight graphite weak flex">LW- Light weight graphite weak flex</option>
<option value="LM- Light weight graphite medium flex">LM- Light weight graphite medium flex</option>
<option value="LR- Light weight graphite regular flex">LR- Light weight graphite regular flex</option>
<option value="GR- Medium weight graphite regular flex">GR- Medium weight graphite regular flex</option>
<option value="SS- Light weight graphite stiff flex">SS- Light weight graphite stiff flex (low torque)</option>
<option value="TS- Medium weight graphite stiff flex">TS- Medium weight graphite stiff flex</option>
<option value="SX- Light weight graphite X-stiff">SX- Light weight graphite X-stiff</option>
<option value="KS- Light weight steel stiff flex">KS- Light weight steel stiff flex</option>
<option value="KR- Light weight steel regular flex">KR- Light weight steel regular flex</option>
<option value="DX- Heavy weight steel extra stiff">DX- Heavy weight steel extra stiff</option>
<option value="DS- Heavy weight steel stiff flex">DS- Heavy weight steel stiff flex</option>
</select>
在评论中,我回应了这样的选项:
echo (!empty($_REQUEST['DriverShaft'])) ? "<div class='reviewItem'><span class='reviewTitle'>Shaft:</span>{$_REQUEST['DriverShaft']}</div>" : "";
如果他们选择了一个,这将向我显示轴选择。但是,如何为每个轴添加价格值?所以在评论中它显示了轴的名称,但我也可以从他们的选择中得到一个价格来加起来?