CGI scripts/forms
Melissa Silvestre
silvest at umslvma.umsl.edu
Fri Oct 20 13:15:47 EDT 1995
This is not really related to libraries, except
inasmuch as a lot of librarians are getting excited about
the use of web forms. But here goes anyway...
All of the replies I've seen so far address the "cgi" side rather
than the "form" side of the question. A form is really easy to
make. The hard part is coming up with a program that formats the
filled-in form data into something usable. If you aren't the
webmaster of your web server, talk to him/her about whether a nice
program is already set up on your server. If you are the webmaster
yourself and you don't have a programming background, you have
a little bit of nastiness ahead.
But if you don't mind seeing the data in its raw, ugly format, you
can make a form right now that emails you the results of what
the user types in. Here's a really short one which gives the
user room to enter their name and a brief comment:
<form action="mailto:silvest at umslvma.umsl.edu" method="POST" >
Your Name : <input name="Name" size="48"><br>
Your Comment :<input name="Comment" size="60"><br>
<p align=center><input type=submit value="Submit comment">
<input type=reset value="Clear">
</form>
Be sure to change the mailto address from mine to yours!
You can invent as many input variables (Name, Comment) as you like.
There are lots of more complicated form input fields, like
radio buttons and pull-down lists, but you can learn those bit
by bit as you need to. NCSA has a page that explains all of them,
http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/Docs/fill-out-forms/overview.html
but you might want to start by looking at the examples at
the bottom of that page rather than trying to read the
programmer-manual style of writing. They also provide (described
in the page) a nice form "action" program that you can use
(in place of the "mailto" action in my sample) just to see what
the variables are set to.
The original question jumped from "forms" in general to "search
forms" in particular. To make a form that actually searches some
kind of index of your web pages is fairly complicated. Or more
precisely, it's the creating of the searchable index and the program
that the form runs that's complicated. If that's what you are
really interested in, see the ongoing thread in this list
about web searching software (harvest, etc.). You more or less need to
be the webmaster to install those software packages.
Melissa Silvestre silvest at umslvma.umsl.edu
>>
>>I for one would like to know how to do basic cgi-based forms and would
>>greatly appreciate input from someone who can make it seem EASY to do.
>>Please guide me to the Web sites, etc. that might give a "recipe" for
>>setting up a search form for a Web Page. I have a few books on
>>Web Page construction but the cgi-based information is not totally clear.
>>
>>Thanks in advance.
>>
>>Cynthia D. Bertelsen
>>Blacksburg, VA
>>
>
>If you're looking for a nice "entry level" intro into cgi scripting, take a
>look at this online tutorial:
>
> http://www.catt.ncsu.edu/users/bex/www/tutor/index.html
>
>This was the single most helpful document on the process I was able to find.
>Michael Watson
>mwatso at gopher1.library.lsumc.edu
>
>
-----------
Melissa Silvestre silvest at umslvma.umsl.edu http://www.umsl.edu/~silvest/index.html (314) 516-5059
Univ of Missouri-St. Louis, Thomas Jefferson Library - Reference
My writings do not reflect the official position of UMSL.
Commercial use of this electronic message is prohibited without specific consent. Permission for unlimited non-commercial use is hereby given.
More information about the Web4lib
mailing list