Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic GCI & Form Question

Status
Not open for further replies.

ljjtek

Technical User
Feb 26, 2001
35
US
I'm new at CGI and after researching what I can, I am incredibly confused. All I want is a simple form on my webpage, but I'm still confused as to what I need for this. Can someone let me know the list of things I need, for instance, 1)a form on my webpage, 2)a script that goes into my cgi-bin..... etc, etc. I know that the form on the webpage will have something like
<form action=&quot;cgi-bin/'name of script?'.cgi&quot; method=&quot;POST&quot;
name=&quot;'name of script?'&quot;>

Not sure what 'name of script' is supposed to be and if its the same thing as the .cgi thing. Basically, I'm just confused on what parts I need to have to make this work. I saw something about /usr/lib/sendmail and that confused me even more. Any help would be greatly appreciated!
 
There's quite a few things to get your head around if your're totally new to cgi - I'd suggest a book, and a few web tutorials on it.

If you have OO programming experience try
HTH Paul


There's always another way
 
see the faqs tab at the top of this forum and check out the faqs on the basics....

Good Luck

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
I responded to a part of this on another request &quot;to write txt files on the server&quot;. I copied the entire perl-cgi program on that question. Look it up. a few questions right after this one.

Here is a sample web html file that request a form to be filled out and then calls and passes the form input to the program on the server. They were used as a set in a web-perl coding class. As I said in the other posting, they have not gone through any complete testing but that some students have taken these two programs(perl & html) with slight modifications to set up an information/order system in it's simplest form(no pun intended). I try to code as simple as possible and document with good formating. It makes better class handouts. Since I program in about 10 different languages I try to not get fancy or tricky.

Here is the html file:

<HTML>
<HEAD> <TITLE>SAMPLE FORM TO INSERT AN INVENTORY RECORD</TITLE> </HEAD>
<BODY><H3><CENTER>
SAMPLE FORM TO INSERT AN INVENTORY RECORD
</H3></CENTER>

</h4>
<center>
<TABLE WIDTH=75 BORDER=13 BORDERCOLOR=DARK>
<TD>
<FORM METHOD=&quot;POST&quot; ACTION=&quot;../cgi-bin/CIM355_WRITE_FORM_DATA_TO_FILE.PL&quot;>
<CENTER>
<TABLE BORDER=1>
<INPUT TYPE=&quot;HIDDEN&quot; VALUE=&quot;RECORD_TYPE&quot;
NAME=&quot;REC_TYPE&quot; SIZE=&quot;11&quot; >
<TR> <TD>PART ID:</TD> <TD><INPUT TYPE=&quot;TEXT&quot; VALUE=&quot;ENTER PART ID&quot;
NAME=&quot;PART_ID&quot; SIZE=&quot;6&quot; MAXLENGTH=&quot;6&quot;> </TD>
<TR> <TD>PART DESC.:</TD> <TD><INPUT TYPE=&quot;TEXT&quot; VALUE=&quot;123 ANY STREET&quot;
NAME=&quot;PART_DESC&quot; SIZE=&quot;20&quot; MAXLENGTH=&quot;20&quot;></TD>
<TR> <TD>COST EACH:</TD> <TD><INPUT TYPE=&quot;TEXT&quot; VALUE=&quot;00.00&quot;
NAME=&quot;UNIT_COST&quot; SIZE=&quot;5&quot; MAXLENGTH=&quot;4&quot;> </TD>
<TR> <TD>SELL EACH:</TD> <TD><INPUT TYPE=&quot;TEXT&quot; VALUE=&quot;00.00&quot;
NAME=&quot;UNIT_SELL&quot; SIZE=&quot;5&quot; MAXLENGTH=&quot;4&quot;> </TD>
<TR> <TD>ON HAND:</TD> <TD><INPUT TYPE=&quot;TEXT&quot; VALUE=&quot;0000&quot;
NAME=&quot;ON_HAND&quot; SIZE=&quot;4&quot; MAXLENGTH=&quot;4&quot;> </TD>
<TR> <TD>ON ORDER:</TD> <TD><INPUT TYPE=&quot;TEXT&quot; VALUE=&quot;0000&quot;
NAME=&quot;ON_ORDER&quot; SIZE=&quot;4&quot; MAXLENGTH=&quot;4&quot;> </TD>
<TR> <TD>ORDER POINT:</TD> <TD><INPUT TYPE=&quot;TEXT&quot; VALUE=&quot;0000&quot;
NAME=&quot;ORDER_POINT&quot; SIZE=&quot;4&quot; MAXLENGTH=&quot;4&quot;> </TD>
</TABLE>
<BR>
<INPUT TYPE=&quot;SUBMIT&quot; VALUE=&quot;CLICK TO ENTER&quot;>
<INPUT TYPE=&quot;RESET&quot; VALUE=&quot;CLEAR FORM FOR RE-ENTRY&quot;>
</CENTER>
</FORM>
</td>
</table>
</center>
</BODY>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top