![]() |
| [Geek Home] [PC Hints & Tips] [Internet] [Programming] [Nanet Sites] |
This CGI performs a search on a flat file. This example can be altered to be used with any flat file data. You can get an idea of how to do this with your own flat file by reviewing the code and form. This CGI was written for a local University to return flat file results from a search. For a more powerful data source, such as Oracle or DB2, see my Java Database Applet example. All *.c source extensions have been changed to *.txt. To begin, I utilized NCSA’s code segment provided in the sample program “util.c” I separated this CGI specific code into a file called cgi_lib.c: cgi_lib.c // #include "cgi_lib.h" I then created some string and HTML functions in str_lib.c: // #include "str_lib.h" void stripquote(char *) ; // HTML commands: void printHeader(char *); And finally, I created the actual s_srch.c file containing the “main” and all necessary procedures and functions to return the dynamic web page results: |
|
|
| [Geek Home] [PC Hints & Tips] [Internet] [Programming] [Nanet Sites] |
Modified: 02/11/99 |