Lets say I have two input fields inside a form, like so.
<form class="my-form" method="POST" action="/my/receiver">
<input id="input1" name="inputfield1" />
<input id="input2" placeholder="More input" />
<input type="submit" value="Submit form" />
</form>
If I am running a server that will listen to a form submission on that link, I know for a fact that #input1
will be sent to the server as data. However, since #input2
does not have a name, will this be sent to the server?
If you answer yes / no, is this standard HTML/HTTP behavior? Can I rely on this in a production application?
Note: I'm asking this question because I do not want some info sent from my form (due to security and liability reasons), and I want to ensure that it is not sent.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…