Why do I use Teacher Han's method to handle multiple submissions and use hidden to solve it, but the hidden received is always the last one?
他来自江湖
他来自江湖 2018-10-31 19:10:28
0
2
1130

<form action="CatWork.php" method="post">

<h1>Four arithmetic operations</h1>

The first number: < input type="text" name="num1"/>

Second number: <input type="text" name="num2"/>

Operator:

<select name="operator">

<option value=" "> <option>

<option value="-"> ;-<option>

<option value="*">*<option>

<option value="/">/<option>

</select>

<input type="hidden" name="doing" value="jisuan"/>

<input type="submit" value="Start calculation"/>

<br/><br/>

<h1>Area Calculation: Circle</h1>

Please enter the radius: <input type="text" name="radius"/>

<input type="hidden" name ="doing" value="cArea"/>

<input type="submit" value="Start calculating the circle area"/>

<br/><br/>

<!--<h1>Area calculation: rectangle</h1>

Please enter Length: <input type="text" name="lang"/>

Please enter width: <input type="text" name="width"/>

<input type="hidden" name="doing" value="rArea"/>

<input type="submit" value="Start calculating the rectangular area"/>-->

</form>


他来自江湖
他来自江湖

reply all(2)
劳动者是第一生产力@鑫鑫@

Because you only have one FORM, and the subsequent hidden name="doing" overwrites the previous control

他来自江湖

I know the mistake

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template