These C routines help you to create HTML FORMs,
with all the usual kinds of input elements,
and to process those forms in CGI programs.
The element-creation routines check against the previous form,
so they can create PERSISTENT elements;
in which user settings are retained from one form to the next,
except of course as they are changed by the user.
This host site does not permit user-defined CGI programs,
a perfectly sensible restriction based on their security concerns.
Because of this,
no online demo is possible here.
You are,
of course,
advised to be aware of security issues when doing any CGI work.
At the end of this C file is an example program,
surrounded by an ifdef.
Compile with -DTESTING to produce the example program,
and install it in your cgi-bin to run it.
Compile with -DTESTING -DFRAMES to produce a FRAMES version.
This program includes some strings containing HTML,
which will probably be rendered
rather than shown
in their proper form when you view this page,
as well as strings likely to be mistaken
for HTML tags,
and thus not shown at all.
Use the View/Source
feature of your viewer for an accurate display,
or just save the file and use your favorite editor.
If you would like to port this code to Java,
go right ahead.
See also a more "industrial strength"
Tom Boutell's CGIC Library
This software is provided free of charge with no support.
Email
me at morris_hirsch@brown.edu
if you do have a problem,
and I will try to help,
but I cannot promise to.
Your comments, suggestions, bug reports,
bug fixes,
and enhancements,
are welcome!
Was this Helpful?
Was this Helpful?
Was it what you were looking for?
How did you find this page?
Search result,
following a link,
recommendation?
Please let me know.
Email
me at morris_hirsch@brown.edu
Or just hire me :-)
Please also visit my home page.
Legalities
Except for all sections which are identified as the work,
and copyright,
of others,
this work is Copyright (C) 1998 by Morris Hirsch.
All rights reserved,
except as granted here.
Redistribution and use in source and binary forms,
with or without modification,
for any purpose,
are permitted,
except as may be restricted by original copyright holders,
provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice,
all earlier copyright notices of others,
this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice,
all earlier copyright notices of others,
this list of conditions and the following disclaimer,
in the documentation,
and/or other materials provided with the distribution.
DISCLAIMER
This software is provided free of charge with no support.
This software is provided in source format;
You are advised to examine it and understand it,
before putting it to use.
This software uses only algorithms and coding techniques
that are available to the public in the open literature.
You are however,
advised to make your own determination of legality,
for your intended use.
This software is provided by the Author and Contributors ``AS IS''
and any express or implied warranties,
including, but not limited to,
the implied warranties of merchantability
and fitness for a particular purpose,
are disclaimed.
In no event shall the Author or Contributors,
or their Agents,
be liable for any direct, indirect, incidental, special, exemplary,
or consequential damages
(including, but not limited to,
procurement of substitute goods or services;
loss of use, data, or profits;
or business interruption)
however caused and on any theory of liability,
whether in contract, strict liability,
or tort (including negligence or otherwise)
arising in any way out of the use of this software,
even if advised of the possibility of such damage.