Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    About sending mail with cgi

    Hello Everyone!

    I do not know anything about cgi or php. Unfortunately.

    I would like a user to send me mail with a form, they would receive an auto-reply, and there would also be a thank you page.

    Is there anywhere online that offers these services for free where they can be inputed in the current html form? I have downloaded php files but everytime i send the form it brings up the php file and I don't know what to edit so that everything works as it should.

    Thanks to all in advance,

    mbay

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,493
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    First, a little terminology ...

    This forum is for Perl. CGI is mistakenly talked about as Perl, but CGI
    is (Common Gateway Interface), and refers to a protocol that can be utilized using Perl, C++, PHP, etc.

    Perl scripts happen to most commonly be located in a directory that your webhost calls the "cgi-bin".

    You can have a form emailer written in either PHP or Perl.

    Since this is the Perl forum, we can steer you in the Perl direction.

    ============

    You need to be able to use an FTP program to upload Perl scripts into your "cgi-bin" directory. Uploading using ASCII format (instead of the normal Binary default). Then, each script needs to have permissions set (CHMOD) in order to allow them to run. If you can do these things successfully, you will be able to find a pre-made script and upload it.

    So we can see what the form looks like, give us a link to your current form,
    even if it does not work yet.

    You can do a search on Google for: Perl Beginning Tutorial

    Find some easy examples (such as the famous "Hello World" script) that will give you some lessons on how to get started.

  • #3
    Regular Coder
    Join Date
    May 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello mlseim,

    thank you very much for your reply!

    http://www.lianebayard.com/waystoreachusb.html

    This is a temporary form.

    I know my server does not allow php, so i don't know if that's perl related or not.

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,493
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    The first step you'll need to take is to learn how to upload
    a Perl script into your cgi-bin, and make it work.

    See this tutorial to get started:
    http://michaelbluejay.com/webdesign/perl.html

    If you can make the "hello world" script work in your cgi-bin, then you'll be
    able to upload any scripts that we might list for you. We have
    no way to upload and configure the scripts for you, so you really
    need to learn this part first.

    EDIT:
    In that tutorial above, don't worry about the SSI part ... your host may not allow SSI. Just get the part about uploading and setting permissions. You can run the script from your URL address line (on your browser).



    .
    Last edited by mlseim; 05-17-2005 at 03:56 AM.

  • #5
    Regular Coder
    Join Date
    May 2004
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello mlseim,

    it seems the "hello.cgi" functions when i type "http://www.lianebayard.com/hello.cgi".

    Good news, yes?

  • #6
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,493
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    Well, no ...

    The text file you made needs to be uploaded into the directory called:
    "cgi-bin" ... this is where your webhost has configured the special directory
    just for your scripts.
    It would be something like this when you're done:
    http://www.lianebayard.com/cgi-bin/hello.cgi

    and also ... I think there is a "typo" in one of your lines ...
    it should look like this:

    #!/usr/bin/perl -w
    print "Content-type: text/html \n\n";
    print "Hello, world";

    --------------


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •