Reputation: 2679
In the following HTML form I am unable to derive the username. Is it because of using "ID" instead of "NAME"? Do suggest an alternative to overcome this problem.
<form action="mailto:demo@demo" method="post" enctype="text/pain">
Username:<input type="text" id="usr"/>
Password:<input type="password" name="pwd"/>
<input type="submit"/>
</form>
Upvotes: 0
Views: 95
Reputation: 1
To access values you should use names
, modify your code like this:
<form action="mailto:demo@demo" method="post" enctype="text/pain">
Username:<input type="text" name="usr"/>
Password:<input type="password" name="pwd"/>
<input type="submit"/>
</form>
and then you can access those values by usr
and pwd
variables.
Hope this helps.
Upvotes: 0