PHP script by Mike Challis, www.642weather.com/weather
Script available at http://www.642weather.com/weather/scripts/join-form.zip
Contact Mike - http://www.642weather.com/weather/contact_us.php
Weather Network Join Form PHP Script - join.php

Version: 1.14 - 04-Sep-2008 see changelog.txt for changes


-----------------------------------------
Installation
-----------------------------------------

Step 1)
Download the captcha utilities zip file, unzip, then and upload all the files to /captcha-secureimage on your server
be sure to preserve the folder structure from the zip file.
http://www.642weather.com/weather/scripts/captcha-secureimage.zip
(if you have already installed this for my contact.php script, you can skip this step)

Step 2)
edit the settings in the top section of join.php

Step 3)
upload join.php to your server and test the form, make sure the captcha works, fill out the application and see if it works.

Optional Step)
You can copy the code into your own PHP site template like this:
open join.php, look for these tags and copy all the stuff inbetween

<!-- To add into your own page TRIM beginning here --> 
 
<!-- To add into your own page TRIM ending here -->

also ....

This code must be at the top of your PHP script:
<?php
 # mchallis says "session_start is required for the captcha-image to function,
 # and must be at the very top of the PHP script."
 # session_start() must be processed before any other output
 # or you might get a warning "headers already sent".
  if( !isset( $_SESSION ) ) {
    session_start();
  }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
        <meta name="description" content="Join Form" />
        <meta name="keywords" content="Join form, join, form" />
        <meta name="language" content="en-us" />

        <title>Join form</title>
        <style type="text/css" media="screen" >
                /* Sample CSS */
                #contactform {
                        font-family: verdana;
                        width: 600px;
                }

                #contactform h1 {
                        font-size: 130%;
                }

                #contactform img {
                        border: 0px;
                }

                #contactform .errors {
                        color: #ff0000;
                }

                #contactform .correct {
                        color: black;
                }

                #contactform legend {
                        font-size: 120%;
                        font-weight: bold;
                }

                #contactform .title {
                        color: black;
                        font-weight: bold;
                        font-size: 90%;
                        margin-top: 2px;
                        margin-bottom: 5px;
                }

                #contactform .field {
                        color: black;
                        font-size: 90%;
                        margin-bottom: 7px;
                }

                #contactform .small {
                        font-size: 100%;
                }

                #contactform .thanks {
                        margin-top: 15px;
                        color: green;
                        font-size: 105%;
                        margin-bottom: 15px;
                }
        </style>
</head>
<body>

-----------------------------------------
Live Demo
-----------------------------------------

You can see my join form here
http://www.northwesternweather.net/join.php


-----------------------------------------
Donate
-----------------------------------------
A paypal donate button is on my scripts page
http://www.642weather.com/weather/scripts.php


-----------------------------------------
Features
-----------------------------------------

Very tight security, it stops all the spammer tricks I have found.

Features:
Tested code (has been running on several sites for several months with no problems)
XHTML Transitional compliant
Reloads form data and warns user if user forgets to fill out a field.
No need to press back button.
Validates syntax of email address (user@aol = bad, user@aol.com = good)
Use as a standalone page or incorporate into your site template
It can run on most any webserver as long as you have PHP installed, and GD support within PHP.

Security:
It has very tight security, it stops all the spammer tricks I have found.
Filters all form inputs from html and other nasties.
Spamchecks email address input from common spammer tactics...
 prevents spammer forcing to:, cc:, bcc:, newlines, and other email injection attempts to spam the world
Make sure the form was posted from your approved host name only. (enable or disable with a setting)
E-mail message shows IP address and user agent (browser version) of user who contacted you

Captcha Image by www.phpcaptcha.org included - Version 1.0.3.1 March 25 2008 (enable or disable with a setting)
# open-source free PHP CAPTCHA script
# Abstract background with multi colored, angled, and transparent text
# Arched lines through text
# Generates audible CAPTCHA files in wav format
# refresh button to reload captcha if you cannot read it.

-----------------------------------------
- How to add another field?
-----------------------------------------
You need this Version or higher: 1.12 - 20-Aug-2008
You would have to edit 5 places places in the script. see the readme.txt
Search in the code for 'add another field here' without the quotes, 
I put this comment just after every part that code would need to be added.
Find each of the five places, then pick a unique field name, and code it yourself.
I have not documented this before, because it is really only a basic contact form. 
There are other free contact forms that are very advanced in that they allow you to configure multiple fields and field types.
This one will never be that advanced because I want it to remain simple.


-----------------------------------------
Terms of Use (Use of this script signifies your acceptance)
-----------------------------------------
You are free to use and modify the code

This php code provided "as is", and Long Beach Weather (Michael Challis)
disclaims any and all warranties, whether express or implied, including
(without limitation) any implied warranties of merchantability or
fitness for a particular purpose.

Copyright (C) 2008 Mike Challis  (http://www.642weather.com/weather/contact_us.php)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


-----------------------------------------
Requirements
-----------------------------------------

PHP version 4.3.9 or greater is recommended
NOTE: This script requires PHP installed using GD image support.
http://us2.php.net/manual/en/ref.image.php




