+ 3
what is the difference between them?
the first one i mentioned gender,value but the second one i didn't, but the result is same ,why? can anybody explain for me? thnx! <input type="checkbox" name="gender" value="1" />Male <br /> <input type="checkbox" name="gender" value="2" />Female <br /> <input type="checkbox"/>Male<br/> <input type="checkbox"/>Female<br/>
2 Answers
+ 4
I pasted your code into a working (public utility) POST exchange so you can try it out.
https://code.sololearn.com/Wm5KbGCQ49C3/?ref=app
+ 1
Aesthetically, there is no difference, but in the second example the server cannot know what values were uploaded, and by the way, the first example should be inside <form> tags.