Roots
Back

Password Fields

Why should you use a password field?

A password field is a particular type of text input area. It does not provide any security other than concealing the text that is typed into it by replacing each character with an asterisk (*) or blob. This provides a small level of security, as a user's password cannot be discovered by simply looking at the screen while they are typing it in.

How to use a password field

<input type="password" name="text">

text - The unique name to identify this password field.

For example;

<form action="form-process.php" method="get">
Username: <input type="text" name="username" maxlength="10" value="your name"><br>
Password: <input type="password" name="password"><br>
<input type="submit" value="Submit">
</form>

Username:
Password:


Note that when you submit the form, you can see the password you chose in plain text.