• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

Setting Up a Form

I'm setting up a form on a site for people to fill out and sent thier info to me, so I can send them a catalogue in the mail. Can anyone cut and paste some code with some instructions on how to interface with the cgi bin on my website. I'm a little confused on the cgi-perl script and what to do with it
Thank You
1 Solution
<FORM ACTION="http://domain.name/cgi-bin/script.cgi METHOD=Post_or_Get ID=Form_id>

*Place Input Here*



To use a form that accesses a cgi script, you must first know where the cgi scripts are located on your server.  Typically, they are located in the cgi-bin folder directly under the domain name.  Once you know where the scripts go, then you put that URL in for the ACTION.  Then for the METHOD, you need to know how the script parses the incoming data.  If it requires that the information be passes by the GET method then you'll have to use that one.  But if the script works with either POST or GET, then I would recommend using the POST method, because with the GET method you can only pass a maximum of 255 characters.  Also, you will need to make sure that you can even run CGI scripts on your server.  Because CGI scripts are such a huge security risk, many servers do not allow them.  Other than that, you just need to provide the user with the places to enter the data you want sent to you.  That would go between the <FORM> and </FORM> tags.  Make sure you put a "Submit" button before the closing </FORM> tag.  Otherwise they will not be able to send it to you.  To put the "Submit" button in you would type "<INPUT TYPE=SUBMIT ID=Submit_id VALUE=Text_displayed_on_button>"  No closing tag is needed.  That should be all you need to know.
abloganAuthor Commented:
Thank You for your help. I'm on a real close deadline and don't have much time (midnight 2 night) to figure it out

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now