Web Page Design
Forms: Start with Content and Structure
Forms are easy to design with any of the WYSIWYG editors
What happens when the user hits a
Contents of the form are sent back to a web server
Web server runs the CGI script and does something with
the contents of the form
The CGI script then sends back ASCII text that defines
the web page the user will next see.
What's a CGI script?
Written in any computer language (usually Perl,
C-Shell script, Tcl, sometimes even Fortran!)
Accepts text from standard input
Understands the syntax of CGI so that it can interpret
Writes to standard output a proper HTML page
Placed in a special area so that the web server can
find and run it when a user calls for it
set text [read stdin ]
exec /usr/ucb/mail email@example.com << $text
puts "Content-type: text/HTML\n"
puts "Thank you for submitting this form"
Produced the following mail message:
From firstname.lastname@example.org Thu Feb 18 11:11
Date: Thu, 18 Feb 1999 11:11:38 -0500 (EST)
From: Nobody <email@example.com.NRAO.EDU>
© Copyright 1999 Associated Universities Inc. Washington D.C.