0
Forms
In the example of from requesting username and password, what is the use of name="username" and name="password" options?
1 Answer
+ 1
When it comes to the time when you need to collect the data from the form, you will need the "name" attributes values to actually collect the data from the form.
In your example above, if I want to get those details from your form then I'll use:
$uname = $_POST['username'];
$pword = $_POST['password'];
This will get those details from the form and store it in those variables.