PHP:错误:未定义索引:[重复]中的操作

This is the code and the error is Notice: Undefined index: action in C:\wamp\www\web\calculator.php on line 24

Here is the code

</div>

There is no value for your select(action). So it's posting blank, try to Assign a value attribute to your options

<option value="+">+<option>
<option value="-">-<option>
<option value="*">*<option>
<option value="/">/<option>

Please try with this code. Keep in mind you must have to set value of each option .

<select name="action">
   <option value="+">+<option>
   <option value="-">-<option>
   <option value="*">*<option>
   <option value="/">/<option>
</select>

Also you can refer here for more information More Info