adding a cgi script to a form

I am curently developing a web site that will use some forms. I haven't used cgi scripts until now. So I have some questions:

1. Can I take a cgi script from the internet , modify it and put it on my web server? Do I need Unix and Perl installed on my computer?

2. Do i have to compile the cgi script after i modify it? Can i install Perl on a Windows System?

3. How can i send the content of a form to my e-mail address without using cgi??

Thanks for reading this.

Comments

  • Hi,

    : I am curently developing a web site that will use some forms. I
    : haven't used cgi scripts until now. So I have some questions:
    Innevitably...oh well, einen web programmer to the rescue. ;-)

    : 1. Can I take a cgi script from the internet , modify it and put it
    : on my web server? Do I need Unix and Perl installed on my computer?
    Yes. Expanding on that - you can take a script, modify it, place it on your server and it will run provided you've set anything up that you need to properly (including setting the scripts permissions so it's execute, e.g. 755). If the CGI script is written in Perl (they can be written in many other languages, though I'd say Perl is by far the best) then you'll need Perl installed on your web server, which if you have a half decent web host it will be.
    As for whether you need UNIX and Perl installed on my computer - you can run Perl under windows or most other operating systems out there if you get the right binary (try ActivePerl from ActiveState as http://www.activestate.com/). This is useful if you want to try running the script on your computer, though you'd probably also need to install a web server application on your computer too, e.g. Apache which is available at http://httpd.apache.org/ - if you're serious about this stuff it'd be excellent learning experience for you to set Perl up on your own computer and a web server to test things through.

    : 2. Do i have to compile the cgi script after i modify it?
    Not if it's in Perl, no. Perl scripts are interpreted, not compiled. That's what makes them cross platform (run on Windows, UNIX etc with very little or no modifications). You just place the script on the server and let rip.

    : Can i install Perl on a Windows System?
    See answer to Q1.

    : 3. How can i send the content of a form to my e-mail address without
    : using cgi??
    There is no surefire way, but this sometimes works:-
    [code][/code]
    If you do a form tag like that with your email address thrown in, it should work out.

    : Thanks for reading this.
    No problem. I'll hope that thanks covers the response too... ;-) j/k If you like my style of explaining things you may want to read some tutorials on Perl that I wrote to up your Perl knowledge. Also explains some of the stuff I've mentioned in here.
    http://www.jwcs.net/webmasters/learning/perl/

    Good luck, shout if you need any more help...

    Jonathan


    -------------------------------------------
    Count your downloads:
    http://www.downloadcounter.com/
    And host your site:
    http://www.incrahost.com/
    Don't say I never give you anything... ;-)

  • I hope to fix all my problems.

    thank u

    bye

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories