Solved

How Do I do This?

Posted on 1997-06-06
3
255 Views
Last Modified: 2013-12-25
I don't know CGI, but am familiar with Pascal, C, and HTML - I would like to write a program that is able to transfer information entered on a form, and write it to the page - similar to a guestbook.  I just need it to support two fields:  1.  Name  2.  Email Address   Any help would be much appreciated
0
Comment
Question by:baller20
3 Comments
 
LVL 1

Expert Comment

by:cgreenup
ID: 1828184
I assume you want to write it in C, since you're familiar with it, in which case, I can't be of much help, as I'm not familiar with C.  However, I have heard of something called 'cgi.c' which I assume contains all the code necessary to handle the cgi part of the program.  Maybe if you take a look at its source/docs that will tell you what you need.

-chrisg@gibson.gibson.com
0
 

Author Comment

by:baller20
ID: 1828185
I'm not sure what you mean.
0
 
LVL 5

Accepted Solution

by:
icd earned 100 total points
ID: 1828186
Here is a simple perl script that will take input from a form and output it to a html document.

---- cut here ----
#!/usr/local/bin/perl

require "cgi-bin.pl";

print &PrintHeader;
print <<__END_OF_HEADER__;
<HTML>
<HEAD>
</HEAD>
<BODY>

EMAIL: $in{'email'} NAME: $in{'name'}<br>

</BODY>
</HTML>
__END_OF_HEADER__
1;

---- cut here ----

You can of course adapt this to output more complex documents but you can see the basics here.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now