HTML for sample text field |
Type your name: <input type="text" name="username" value="nobody" size=20 maxlength=40> |
What shows on the browser window is |
Type your name: nobody |
The typing box is of length 20 characters (default=20) and will scroll up to a max of 40 characters (default=unlimited). The value, size and maxlength fields are optional - "nobody" is the initial value in this case. |
What is sent to the CGI program is the name and value pair: username=<whatever the user typed> |
The password field is the same, except that whatever the user types is not shown, <input type="password" . . .> |
The hidden field is the same, except that nothing shows on the browser, <input type="hidden" . . .>. This is a technique for one CGI program to pass data to another. |