Forms | Sololearn: Learn to code for FREE!

0

Forms

In the example of from requesting username and password, what is the use of name="username" and name="password" options?

8/6/2017 2:33:10 PM

Keerthi Reddy

2 Answers

New 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.