what is the difference between them? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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/>

6th Jun 2017, 12:42 PM
A.RAHMAN
A.RAHMAN - avatar
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
6th Jun 2017, 2:37 PM
Kirk Schafer
Kirk Schafer - avatar
+ 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.
6th Jun 2017, 1:49 PM
Madera Oxidada
Madera Oxidada - avatar