|
The Next Stage
If, and only if, you have read the previous sections and actually managed to get the script to
run are you ready to move on. You cannot rush ahead with Perl and CGI, so if you haven't
already done that, go back and try again. There is no way to move on until you have mastered
both file permissions and uploading in different formats - no scripts will run until you have.
A script at last
Start up your FTP program and connect to your CGI-BIN account.
We are now ready to work on adapting an existing freeware script together.
For this I decided to use BigNoseBird.com's BNBFORM All-In-One Form Processing Script. The
reasons for this are:-
- A form processing script is a useful thing to have.
- This version is very adaptable.
- It introduces you to the two server concept.
- It has multiple files, but not too many to handle.
- When you have mastered this, moving on to a bigger script will be easier.
- I hadn't given instructions for a form script before now.
The first steps
You will need to download the script from here. If you already have a copy, make sure
it is V4.0 (Updated January 31, 2000) before starting.
Unzip the files.
They unzip to a directory called bnbform by default, and there's no reason to change that as far
as I can see.
Read the readme.
Open up the readme.txt file and read at least enough of it to understand how the program works
and what it does. There is no point in me repeating much of the content in there, and indeed
I am not going to.
New users: If you signed up for your CGI-BIN account after the end of July 2000
you will need to change all references to home in the paths to home2 or the
script will not work.
Manipulating the files.
I suggest that you make a directory called bnbform inside whatever directory you use for both
the CGI-BIN server and the 'planet' server. I have a separate directory for both of these, and it
makes life much easier that way.
To put it another way, you should have 2 directories, something like this:-
/portsweb/bnbform
/portscgi/bnbform
The reason for this is that the HTML files really belong on the 'planet' server as they don't
require SSI or anything fancy to work. If you set it up this way, you will be able to include
the form in any of your pages on the 'planet' server with a lot less trouble.
Copy (don't move) the following files into the bnbform directory
in the 'planet' server directory on your hard drive:-
bnbform.html
oops.html
thanks.html
Copy (don't move) the following files into the bnbform directory
in the CGI-BIN server directory on your hard drive:-
bnbform.cgi
mymessage.baut
You should now have a directory structure like this:-
/portsweb/bnbform/bnbform.html
/portsweb/bnbform/oops.html
/portsweb/bnbform/thanks.html
/portscgi/bnbform/bnbform.cgi
/portscgi/bnbform/mymessage.baut
In case you are wondering, I told you to copy the files rather than move them so that you would
always have originals to refer to without needing to unzip them again. This is a good habit to get
into.
|