Lyris User's Guide
[previous] [next] [contents]
Allowing Users to Subscribe from a Web Form
Table of Contents
· Introduction
· Email Commands
· Web Interface for Users
· Server Administrator
· Site Administrator
· List Administrator
· Other Topics
· Add-On Packages
· · NT Authentication Option
· · Lyris List Manager ODBC Driver
· · Random Document Responder
· · Parental Approval of Subscriptions
· · Allowing Users to Subscribe from a Web Form
· · The Apache Web Server
· Installing and Upgrading
· Appendix
· Frequently Asked Questions

Allowing Users to Subscribe from a Web Form

If you are running a website, you can easily embed a member sign-up form on your front page. This allows your visitors to subscribe to your mailing list with ease. This subscription method is perhaps the easiest and most effective means of recruiting new members to your list.

You can accomplish this in two easy steps:
1. Download "submany.pl" from http://www.lyris.com/down/scripts.html.
2. Add the HTML form to your web page.

Download "submany.pl"

First, you must visit the "scripts" page, accessible here: http://www.lyris.com/down/scripts.html

From the scripts page, you will notice a variety of tools available for you to use. The scripts are listed in alphabetical order for your convenience. Navigate down to the "submany.pl" entry. You can download the script by clicking on the "submany.pl" link.

Save submany.pl to your web server's cgi-bin directory, and double-check to make sure the file has execute permissions.

Add the HTML Form to your Web Page

The HTML you will insert into your web page depends on a couple of things. Do you want to ask for their name? Do you want the user to be able to sign up for more than one list at a time?

For example, if you request the name of the subscriber, you can use the $subst(recip.fullname) mail merge tag in your list messages to merge the name in. This adds a nice personal touch to your messages.

On the other hand, if you only have one list you don't need to provide the user with an option of which list to sign up for.

Where the form is inserted in your page is up to you. The simplest implementation of a sign up form is one without list checkboxes or a name field. The code for this is below:

    <form action="cgi-bin/submany.pl" method=post>
    Email:<input type=text name=email size=20><br>
    <!input type=hidden name=goto_url value="home_link">
    <!input type=hidden name=goto_text value="Click here to return to home_link">
    <!input type=hidden name=redirect value="redirect_link">
    <input type=hidden name="list" Value="join-listname@lyris_server">
    <br><input type="submit" value="Join">
    <P>
    </form>

With the few lines above, you can have your page ready to go. In the above code sample, there are four hidden fields. The function of each is explained below.

The "list" field is the name of the list to subscribe to. Thus, if your sign-up form is for a list called "dailynews", and the site the list is on is "list.lyris.net", you would substitute "join-listname@lyris_server" with "join-dailynews@list.lyris.net".

The goto_url field allows you to define a URL, which will be appended to the output of the submany.pl script. Thus, on the result page, you can display a hyperlink so the user is not forced to go "Back" in the browser's history.

The goto_text field is where you define the display text of the URL. This field works in tandem with the goto_url field. In HTML, the two fields are combined as follows:

    <a href=goto_url>goto_text</a>

The redirect field is where you define the page you want displayed once the script executes. This will override the default page, which is generated by the submany.pl script.

If you want to activate any of the hidden fields, you need to remove the "!" before the field you wish to activate.

Now consider a form that allows a user to sign up for multiple lists at once. In addition, this form also asks the user for their name. The code for this would appear like this:

    <form action="cgi-bin/submany.pl" method=post>
    Email:<input type=text name=email size=20><br>
    Name:<input type=text name=name size=20><br>
    <!input type=hidden name=goto_url value="home_link">
    <!input type=hidden name=goto_text value="Click here to return to home_link">
    <!input type=hidden name=redirect value="redirect_link">
    <input type="checkbox" name="list" Value="join-jazztalk@lists.lyris.net">jazztalk<br>
    <input type="checkbox" name="list" Value="join-blues@lists.lyris.net">blues<br>
    <input type="checkbox" name="list" Value="join-sixstring@lists.lyris.net">sixstring<br>
    <input type="submit" value="Join">
    <P>
    </form>

The first thing you may notice in the above code example is the text input for the user's name:

    Name: <input type=text name=name size=20><br>

By adding that form field, the user may provide their name, which will become part of their member record.

Secondly, this code example uses checkboxes to allow the user to select subscription to more than one list:

    <input type="checkbox" name="list" Value="join-jazztalk@lists.lyris.net">jazztalk<br>
    <input type="checkbox" name="list" Value="join-blues@lists.lyris.net">blues<br>
    <input type="checkbox" name="list" Value="join-sixstring@lists.lyris.net">sixstring<br>

Three checkboxes are displayed here, one for "jazztalk", one for "blues", and one for "sixstring". Each checkbox represents a list on your Lyris List Manager server. The member will be subscribed to each list they "checked".

Watch the Subscriptions Come In

Now that your web form is up and running, you can use Sub/Unsub/Confirm reports to analyze how many subscriptions you are receiving. The Sub/Unsub/Confirm reports do not detail the "source" of the subscription, but they are a good way to get a look at raw data.

Other pages which link to this page:
  • Add-On Packages
  • Significant New Features in v4.0
  • Page 493 of 629