PASSWORD indicates that the field is for typing in a password. PASSWORD works just like a TEXT type field, with the difference that whatever is typed is not displayed the screen (in case someone is watching over your shoulder or you have to leave the work station). Instead of showing what you typed in, the browser displays a series of asterisks (*), bullets (·), or something to show that you are typing, but not what you are typing. So, for example, this code:

<FORM ACTION="../cgi-bin/mycgi.pl" METHOD=POST>
name: <INPUT TYPE=TEXT NAME="realname"><BR>
password: <INPUT TYPE=PASSWORD NAME="mypassword">

gives us this form:


Note that PASSWORD fields are not sent encrypted, they are sent in the same manner as all the other elements on the form: in the clear. Note also that when you use PASSWORD you should also set the form METHOD to POST.

About the Author
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.