0
what's the difference if i use name attribute and don't use name attribute because i cant see the difference in result or output
here are two codes below. one includes name attribute and other is without name attribute. my question is what's the difference if i use name attribute and don't use name attribute because i cant see the difference in result or output https://code.sololearn.com/WXUmk0s3l8HW/?ref=app https://code.sololearn.com/Wt18Ff03pla6/?ref=app
1 Antwort
0
The name is used in form submission (in Document Object Model).
When you submit a form only the fields with a name will be submitted.
So, if you have a php file for processing your form after submission
you should have name attribute defined.
For example, you can access the fields like :
<?php
echo $_GET["username"];
echo $_GET["password"];
?>