我正在尝试编辑我的 PHP 脚本,因此当用户单击提交时,我添加到表单中的价格将作为总计添加,但我不确定如何将这些值相加。
HTML
<select name="service">
<option value="Yes" value="10">Yes £10</option>
<option value="No">No</option>
</select>
<form method="post" action="example.php">
<select name="booking">
<option value="Double Room" value="50">Double Room £50</option>
<option value="Twin Room" value="70">Twin Room £70</option>
<option value="Family Room" value="100">Family room £100</option>
</select>
<br /> <br />
<input type="submit" value="submit" action="example.php" name="submit"><br />
</form>
PHP
You have choosen the <?php echo $_POST["booking"]; ?>