[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] CGI how?



>Hi,
>NOVICE ALERT !
>
>I am trying to learn about CGI scrips. (but know nothing as yet)
>
>I have this file which is written in perl called formmail.pl
>(downloaded from http://worldwidemart.com/scripts/cgi-
>bin/download.cgi  ) and I want to use it with a form on my webpage
>(to validate the form etc.)
>
>How the hell do I go about it?

In the first place, if you are asking for free advice, ask nicely.

>How do I execute them from a web browser?

CGI scripts are executed via the ACTION attribute of a FORM definition in a
page's HTML e.g.:

	<FORM METHOD="POST" ACTION ="/cgi-bin/exec/script_name.pl">

	<!--FORM HTML HERE-->

	</FORM>

Here, ACTION specifies the path to the cgi script together with the
execution method (not to be confused with METHOD).  What path & exec method
you should use varies from server to server, so you should ask your
webmaster (if using an ISP) or read your server software manual (if running
your own server) what you should use should use for the ACTION.  Very
probably you'll have to create a cgi-bin directory in a specified location
in your web space and upload your script to that directory.  The METHOD can
be either POST or GET depending on what the script and/or server permits.

>How can I use chmod 755 ?

chomd is an unix command used to set the proper read/write/execute
permissions for a file on a unix-based server.  The value of each digit
represents a different permission. You'll need to check if your server is
unix-based.  If it is, setting the chmod to 755 gives you server permission
to attempt to execute the file. If you are a Mac user, use Fetch (free from
ftp.dartmouth.edu) to set permissions from the Remote menu after selecting
the file from the file list in the ftp session dialog box.  You'll need to
check all of the boxes in the execute column.

>and where is the so called  Unix command line?

It's a DOS-like command line, that, if you are using a Mac and Fetch you
only rarely will need to worry about.  You certainly don't need to worry
about it to set up a simple form-handling script unless something goes
awfully wrong.

>Step by step instructions for stupid people are appreciated,

If all of this is Greek to you, you'll need to buy a book or two: at least,
a comprehensive tome on HTML with a good chapter on forms & CGI.  Also look
at www.webmonkey.com and search around for a basic tutorial on CGI -- I am
sure you can find most of the information you need there.

Also, keep in mind its going to take longer than you think to get up to
speed on all of this and get the form working.  If you need it for a
business use ASAP or sooner, hiring a consultant is well worth the money in
the long run because you will save a great deal of time an avoid commitment
to software that may not serve your needs in the long run.




Peter R. Wiley

PR/Design -- Research & Communication & Design Services for Public Affairs
& Politics
301 South 21st Street
Lewisburg, PA 17837-1615

Phone: 570-522-0738                      Fax: 570-522-0736
	E-Mail: prdesign@sunlink.net



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org