Password and Hidden Fields

May 14, 2009, Posted by admin at 11:44 am

This form contains a password field and a hidden field, the VALUE of which will be passed to the script along with those of the other fields.

Enter A Text Password:<INPUTE NAME=password TYPE=password SIZE=8>
Enter A Test Password:

A password field behaves exactly like a normal text entry field, except that it displays asterisks in the place of any input.

A hidden field is created with TYPE = “hidden”, and its VALUE is what is returned by the browser.

You’ll notice if you submit the above form, an additional field which you were not aware of is echoed. You weren’t aware of it because it’s hidden. Here’s the code for the hidden field. A hidden field always returns the same value. A hidden field looks just like a text field to the web server when the form is submitted, as though the user had typed in the value. It can be used to store values in forms which you don’t want the user to have to type (or re-type).


<INPUT NAME=invisible TYPE=hidden VALUE="Hidden Value">

No comment yet.

You must be logged in to post a comment.