[thelist] Re: CGI form

John.Brooking at sappi.com John.Brooking at sappi.com
Thu Mar 11 16:12:13 CST 2004


> Date: Wed, 10 Mar 2004 16:02:50 -0800
> From: "Martin E" <martin at fiercestreetnetworks.aboho.com>
> To: <thelist at lists.evolt.org>
> Subject: [thelist] CGI form
> 
> I have a mailto link on my contact page, but would like 
> to create a form instead, but cannot figure out how to 
> do so with cgi. I have just about all the bells and whistles 
> you can get with a web host:
> 
> :cgi
> :php
> :sql

If you can also run Perl, I have a solution at
http://www.pobox.com/~JohnBrook/codelib/. I designed it specifically as a
replacement for the "mailto" tag. The Perl source for the CGI program is
available as a link there, and I use it in my own contact form, so you can
look at that page source as an example of a calling form. It requires two
other Perl modules: CGI (which is usually bundled with Perl), and MIME::Lite
(see link on my page). There is extensive documentation within comments in
the source code.

> Can anyone help create a simple form, along with the
> cgi to go with it? I would need to know how to "enable"
> the cgi within the cgi-bin folder - do you have to do that?

I'm not an admin, so if your cgi-bin folder is not set up to allow CGI
execution already, I'm not sure how to do that, but I'm sure someone else on
this list can tell you. I do know that when you save the Perl script in it,
you need to:

   1) Make sure the #! line at the top has the correct path for your server;
   2) Make sure the permissions are set for world to execute (in *nix
language).

> Name:
> Email:
> Phone:
> Comments:

Yes, the form can do all that. (Name and Email are part of the standard
expected input, and it will also pass along any other fields it finds. It
can also enforce required fields.)

Good luck, and let me know off-list if you try it and have any more
questions.

- John
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This message may contain information which is private, privileged or
confidential and is intended solely for the use of the individual or entity
named in the message. If you are not the intended recipient of this message,
please notify the sender thereof and destroy / delete the message. Neither
the sender nor Sappi Limited (including its subsidiaries and associated
companies) shall incur any liability resulting directly or indirectly from
accessing any of the attached files which may contain a virus or the like. 


More information about the thelist mailing list