Tải bản đầy đủ (.ppt) (20 trang)

Internet intrarnet CIS class 7

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (176.87 KB, 20 trang )

Internet / Intranet
CIS-536

Class 7


HTML Forms
A Method to Allow Users to Pass Information to a CGI
Script
Forms Allow Information to Be Entered Via:
Text Fields
Selectable Lists
Checkboxes
Radio Buttons
Submit / Reset Buttons

Each Field Is Identified by a Name
Optional Default Value
E.g.
<INPUT TYPE=“Text” Name=“Field1” Value=“Default”>
<INPUT TYPE=“Submit” Value=“Click Here”>
Example


HTML Forms (2)
Submit Button Sends Data to CGI Script
Name/Value Pairs Separated By &
METHOD = “GET”
Uses HTTP Get Method
Parameters are Sent in URL
“Command Line” Arguments


Data Follows “?”
Easily Visible to Users
Some Servers Truncate the URL
Passed to Perl as QUERY_STRING Environment Variable

METHOD = “POST”
Data is Sent in HTTP Message Body
Passed to Perl as stdin

ACTION=“URL”
Identifies the Target URL

ACTION =“mailto:xxx”
Data is Mailed to Target email Address
Example


Forms – Text Fields
Text Box: Type=Text
Size=“15” Maxlength=“20”>

Size – Size of Text Box in Characters
Maxlength – The Maximum Number of
Characters Allowed
Type=Password
Same, Except User Input is Echoed as *’s

Note: Password is Still Sent to Server in Plain
Text

Pwd Example
Example


Forms – Multiline Text Fields
Multiline Text