Adobe GoLive Tips

Configure the Script

Now that the form is all set up, it is time to make sure the script is configured for your server, and has the proper permissions set.

First make a backup copy of the script in case you don't quite get it right the first time. This is not to mean that it is complicated—it is extremely simple. Of course, it always is when you know how, right?

Open Matt's FormMail script in your favorite text editor. On the Mac I use BBEdit. It is nice because it color codes values and otherwise flags certain parts of the code for you. Your editor may not do this, so you'll just have to scrutinize the text a little bit to find what you are looking for. It is only two lines close to the beginning of the script, so don't worry.

At the top of the script you'll see text surrounded by a box created from # signs.

Matt's FormMail script opened in a text editor

You want to find the part of the script that sets the referers and recipients allowed from your Web directory. You are looking for the following lines:
@referers= ()
and @recipients= ()

Where you see my domain, swanilda.com, you want to enter your own values within the parentheses—your domain or IP address. Be sure to leave the single quotes.

Now all you have to do is save and upload the script to your cgi-bin.

Set Permissions to executable

Next you need to set permissions for the script. The usual permissions for FormMail is chmod 755 to make it executable. Using the Golive ftp client, select your file while connected to the server, and check the boxes for Execute.

Now upload your html page to the proper directory, and the script to the cgi-bin. Test your form in the browser. Fill in some data and hit the submit button. The results should arrive in your E-mail!