View Full Version : About sending mail with cgi
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,
05-17-2005, 04:30 AM
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.
thank you very much for your reply!
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.
05-17-2005, 04:49 AM
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:
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.
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).
it seems the "hello.cgi" functions when i type "http://www.lianebayard.com/hello.cgi".
Good news, yes?
05-17-2005, 05:06 AM
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:
and also ... I think there is a "typo" in one of your lines ...
it should look like this:
print "Content-type: text/html \n\n";
print "Hello, world";
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.