upload this script in plaintext, or ASCII, mode into the same directory as mojo.cgi. chmod 755 the multiple_subscribe.cgi script.
You are good to go.
View this script in a web browser, if everything is installed correctly, you should see a simple subscription form.
This script takes two different arguments; list and email. Thusly, you have to make an HTML form that will supply this script with these two arguments:
<form action="multiple_subscribe.cgi" method="post"> <p>Lists:</p> <input type="checkbox" name="lists" value="first_list" /> My first list<br/> <input type="checkbox" name="lists" value="second_list" /> My second list<br/> <input type="checkbox" name="lists" value="third_list" /> My third list<br/> <p>Your email:</p> <input type="text" name="email" /> <input type="submit" value="Subscribe Me" /> </form>
You can also view the source of the initial screen of multiple_subscribe.cgi and copy and paste the form it creates.
This script also takes an optional argument, redirect_url that you may set to any URL where you'd like this script to redirect, once it's done:
<input type='hidden' name='redirect_url' value='http://mysite.com/thanks.html'>
This script has one variable on top of the script, called $Debug. You may set this variable to '1' to gain a better insight on what exactly is happening behind the curtains.
Copyright (c) 1999 - 2003 Justin Simoni me@justinsimoni.com http://justinsimoni.com
All rights reserved.
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.