<!-- 
document.writeln('<table border="0" cellpadding="2" bgcolor="#FFFFFF">');
document.writeln('  <tr>');
document.writeln('    <td><img border="0" align="Left" src="http://www.web-source.net/graphics/wbontrager.jpg"');
document.writeln('	  height=105 width=80 /><font face="Arial" size="+1"><b>How I did it - Recording');
document.writeln('      Ezine TOS Agreement &amp; Subscription Extension</b></font><br />');
document.writeln('      <br />');
document.writeln('      <font face="Verdana,Helvetica" size="2">By');
document.writeln('      <a href="http://www.web-source.net/cgi-bin/web/jump.cgi?ID=762" target="blank">William');
document.writeln('      Bontrager</a><br />');
document.writeln('      <br />');
document.writeln('      When we decided to have a subscription terms of service for WillMaster');
document.writeln('      Possibilities, we needed software to verify agreement to the terms with a');
document.writeln('      digital signature.<br />');
document.writeln('      <br />');
document.writeln('      We also made a decision to offer six-month subscriptions instead of perpetual');
document.writeln('      subscriptions. Therefore, the software should add the email address to a');
document.writeln('      renewed subscription list whenever a subscriber digitally signs the terms.<br />');
document.writeln('      <br />');
document.writeln('      Oh, and while we\'re at it, let\'s also make a form text box field on the "thank');
document.writeln('      you" page where subscribers can provide feedback after they\'ve agreed to');
document.writeln('      the terms and extended their subscription.<br />');
document.writeln('      <br />');
document.writeln('      I decided to use Master Form V3 from');
document.writeln('      <a href="http://willmaster.com/master/formV3/?wsnet" target="_blank">http://willmaster.com/a/23h/pl.pl?mfv3</a>');
document.writeln('      instead of writing custom software. One extra installation of the program');
document.writeln('      would be needed because it gets minor modifications. (The software license');
document.writeln('      allows the installation of multiple copies with the one purchase so long');
document.writeln('      as they are all installed on the one licensed domain.)<br />');
document.writeln('      <br />');
document.writeln('      The process starts with a URL like');
document.writeln('      http://willmaster.com/possibilities/sub/tos.pl?you@yourdomain.com and ends');
document.writeln('      with the terms agreed to and a form the subscriber may use to provide feedback');
document.writeln('      to the publisher.<br />');
document.writeln('      <br />');
document.writeln('      I\'ll show you how I did it.<br />');
document.writeln('      <br />');
document.writeln('      To do it yourself, all you need is Master Form V3 and a plain text word processor');
document.writeln('      like NotePad or BBEdit.<br />');
document.writeln('      <br />');
document.writeln('      First, I made three web pages, a custom error page, the first display page,');
document.writeln('      and the second display page.<br />');
document.writeln('      <br />');
document.writeln('      Custom Error Page &#151; is a page to be displayed only when the modified');
document.writeln('      script is accessed without an email address or with an incorrectly formatted');
document.writeln('      email address. It\'s a simple page explaining that the URL they used must');
document.writeln('      end with a question mark and their email address.<br />');
document.writeln('      <br />');
document.writeln('      First Display Page &#151; is the first page to display (unless the custom');
document.writeln('      error page displays). It presents the terms and has an "I agree" button.');
document.writeln('      The "I agree" button is in a form with hidden fields expected by Master Form');
document.writeln('      V3. (I renamed the Master Form V3 program handling this page\'s submission');
document.writeln('      to subextend.pl)<br />');
document.writeln('      <br />');
document.writeln('      Here is the form, with the terms omitted (they\'re in a textarea field on');
document.writeln('      the original page):</font>');
document.writeln('      <pre>&lt;form method="POST"');
document.writeln('   action="subextend.pl"&gt;');
document.writeln('&lt;input type="hidden"');
document.writeln('   name="email"');
document.writeln('   value="[[email]]"&gt;');
document.writeln('&lt;input type="hidden"');
document.writeln('   name="emailfields"');
document.writeln('   value="email"&gt;');
document.writeln('&lt;input type="hidden"');
document.writeln('   name="requiredfields"');
document.writeln('   value="email"&gt;');
document.writeln('&lt;input type="hidden"');
document.writeln('   name="emailtemplate"');
document.writeln('   value="data/extensions.email.template.txt"&gt;');
document.writeln('&lt;input type="hidden"');
document.writeln('   name="filetemplate"');
document.writeln('   value="data/extensions.file.template.txt"&gt;');
document.writeln('&lt;input type="hidden"');
document.writeln('   name="dbfile"');
document.writeln('   value="data/extensions.txt"&gt;');
document.writeln('&lt;input type="hidden"');
document.writeln('   name="goto"');
document.writeln('   value="/possibilities/sub/subthextend.shtml"&gt;');
document.writeln('&lt;input type="submit"');
document.writeln('   value="I acknowledge. Extend subscription."&gt;');
document.writeln('&lt;/form&gt;');
document.writeln('</pre>');
document.writeln('      <p>');
document.writeln('      <font face="Verdana,Helvetica" size="2">The hidden fields tell Master Form');
document.writeln('      V3 (renamed subextend.pl) a properly formatted email address is required');
document.writeln('      for the form to be submitted. They tell the program to send an email when');
document.writeln('      the form is submitted. And, they tell the program to record the submission');
document.writeln('      in a certain database file using a certain database record template, which');
document.writeln('      could contain instructions to record IP address and other available');
document.writeln('      information.<br />');
document.writeln('      <br />');
document.writeln('      The database is where the digital signature is recorded, along with the email');
document.writeln('      addresses that have extended their subscriptions.<br />');
document.writeln('      <br />');
document.writeln('      Note the [[email]] placeholder in one of the hidden fields. When the page');
document.writeln('      displays with the first URL, the modified Master Form V3 replaces the placeholder');
document.writeln('      with the email address. The placeholder can be inserted into the visible');
document.writeln('      text of the web page, too, so the subscriber knows the correct email address');
document.writeln('      is associated with the agreement to the terms.<br />');
document.writeln('      <br />');
document.writeln('      Second Display Page &#151; is the second page to display, after the terms');
document.writeln('      agreement has been recorded. It\'s a web page with hidden fields similar to');
document.writeln('      the previous page, but without the database instructions. The purpose of');
document.writeln('      this page is to send any feedback the subscriber may choose to provide and');
document.writeln('      then to display an appropriate "thank you" page.<br />');
document.writeln('      <br />');
document.writeln('      The first page to display and the second page to display are both forms that');
document.writeln('      submit to an unmodified version of Master Form V3.<br />');
document.writeln('      <br />');
document.writeln('      The link that starts the process, causing the first page to display in the');
document.writeln('      subscriber\'s browser, is something like this:<br />');
document.writeln('      <br />');
document.writeln('      http://willmaster.com/possibilities/sub/tos.pl?you@yourdomain.com<br />');
document.writeln('      <br />');
document.writeln('      tos.pl is actually a modified version of Master Form V3.<br />');
document.writeln('      <br />');
document.writeln('      (Later in the article, in the "The Long URL Method" section, I\'ll disclose');
document.writeln('      a method you can use that eliminates the need to modify the program.)<br />');
document.writeln('      <br />');
document.writeln('      This are the modifications for tos.pl:<br />');
document.writeln('      <br />');
document.writeln('      At line 1263 (of version 3.44 of January 12, 2004, possibly different line');
document.writeln('      numbers for other versions), you\'ll find this line:</font>');
document.writeln('      </p><pre>ErrorHTML("Unauthorized use by $ENV{HTTP_REFERER}")');
document.writeln('   unless &amp;ParseFormData and trail(1);');
document.writeln('</pre>');
document.writeln('      <p>');
document.writeln('      <font face="Verdana,Helvetica" size="2">(Although the above line is broken');
document.writeln('      to two, it\'s all one line in the program.)<br />');
document.writeln('      <br />');
document.writeln('      Above that line 1263, I inserted this line:</font>');
document.writeln('      </p><pre>my $email = $ENV{QUERY_STRING};');
document.writeln('</pre>');
document.writeln('      <p>');
document.writeln('      <font face="Verdana,Helvetica" size="2">That line stores the email address');
document.writeln('      into a variable named $email, before the regular parser gets hold of it.<br />');
document.writeln('      <br />');
document.writeln('      Below that line 1263, I inserted these five lines:</font>');
document.writeln('      </p><pre>$In{email} = $email;');
document.writeln('$In{emailfields} = \'email\';');
document.writeln('$In{requiredfields} = \'email\';');
document.writeln('$In{errorpage} = \'_______________\';');
document.writeln('$In{goto} = \'_______________\';');
document.writeln('</pre>');
document.writeln('      <p>');
document.writeln('      <font face="Verdana,Helvetica" size="2">In the first of those five lines,');
document.writeln('      the email address is stored in the global variable where the program expects');
document.writeln('      to find it.<br />');
document.writeln('      <br />');
document.writeln('      The next second and third of those five lines tell the program that a properly');
document.writeln('      formatted email address is required.<br />');
document.writeln('      <br />');
document.writeln('      The fourth of those five lines tell the program where to find the custom');
document.writeln('      error page. The underscore was replaced with the custom error page\'s http://...');
document.writeln('      URL. <br />');
document.writeln('      <br />');
document.writeln('      The fifth of those five lines tell the program where the next page is at,');
document.writeln('      in this case the first page to display, the terms agreement page. tos.pl');
document.writeln('      retrieves the web page at the URL that replaced the underscore, replaces');
document.writeln('      any placeholders found on the page, then displays the customized page.<br />');
document.writeln('      <br />');
document.writeln('      The first page is now displayed in the browser. It contains the terms and');
document.writeln('      an "I agree" button. When the button is clicked, the fact is recorded in');
document.writeln('      the database and the second page is displayed. On that second page, the');
document.writeln('      subscriber can optionally provide feedback.<br />');
document.writeln('      <br />');
document.writeln('      This gives me a list of email addresses that have agreed to the terms and');
document.writeln('      extended the subscription. It also gives me a lot of good feedback.<br />');
document.writeln('      <br />');
document.writeln('      Except for the modified program for the first URL, the sequence is a straight');
document.writeln('      forward multi-page form made for Master Form V3. It is an efficient multi-page');
document.writeln('      forms processor.<br />');
document.writeln('      <br />');
document.writeln('      When the extension deadline has passed, the list of email addresses that');
document.writeln('      have agreed to the terms and extended the subscription will replace the current');
document.writeln('      subscription list.<br />');
document.writeln('      <br />');
document.writeln('      I can\'t tell you how to do that for your list software because we use different');
document.writeln('      software than you do. Your software should have instructions for replacing');
document.writeln('      a subscription list or how to purge a list. If it allows you to upload');
document.writeln('      subscription lists, you might be able to delete the old then upload the');
document.writeln('      new.<br />');
document.writeln('      <br />');
document.writeln('      <b>The Long URL Method</b><br />');
document.writeln('      <br />');
document.writeln('      If I had decided not to modify a copy of Master Form V3, to use a long URL');
document.writeln('      instead, it would have have been a long URL indeed. But it would have done');
document.writeln('      the job.<br />');
document.writeln('      <br />');
document.writeln('      The URL would have been something like this (intentionally broken into multiple');
document.writeln('      lines to fit into this article\'s margins):</font>');
document.writeln('      </p><pre>http://willmaster.com/possibilities/sub/tos.pl');
document.writeln('?email=slowery@web-source.net');
document.writeln('&amp;emailfields=email');
document.writeln('&amp;requiredfields=email');
document.writeln('&amp;errorpage=_______________');
document.writeln('&amp;goto=_______________');
document.writeln('</pre>');
document.writeln('      <p>');
document.writeln('      <font face="Verdana,Helvetica" size="2">The underscores in the URL would');
document.writeln('      be replaced with the http://... URLs that were instead put into the modified');
document.writeln('      program.<br />');
document.writeln('      <br />');
document.writeln('      A long URL like that is inconvenient, especially when used in email. It could');
document.writeln('      be shortened at a URL shortening service web site, putting the long URL into');
document.writeln('      a meta-refresh tag and publishing the URL to that page, or with a custom');
document.writeln('      redirect script.<br />');
document.writeln('      <br />');
document.writeln('      If you want to duplicate the functionality presented in this article but');
document.writeln('      are uncomfortable with modifying Master Form V3, the long URL option exists.');
document.writeln('      (See the "A Small Measure Of Protection From Commission Thieves" WMP Weekly');
document.writeln('      Webmaster Tip, near the end of this issue, for the code of a custom redirect');
document.writeln('      script.)<br />');
document.writeln('      <br />');
document.writeln('      <b>Will Bontrager</b><br />');
document.writeln('      <br />');
document.writeln('      Copyright &copy; Bontrager Connection, LLC <br />');
document.writeln('      <br />');
document.writeln('      <b>About the Author:</b></font><br />');
document.writeln('      <br />');
document.writeln('      </p><table border="0" cellspacing="0" cellpadding="0" width="100%">');
document.writeln('	<tr>');
document.writeln('	  <td bgcolor="#EAE8E8"><font face="Verdana,Helvetica" size="2">William Bontrager');
document.writeln('	    Programmer/Publisher,');
document.writeln('	    "<a href="http://willmaster.com/possibilities/?wsnet" target="blank">WillMaster');
document.writeln('	    Possibilities</a>" ezine');
document.writeln('	    <a href="mailto:possibilities@willmaster.com">mailto:possibilities@willmaster.com</a><br />');
document.writeln('	    <br />');
document.writeln('	    Are you looking for top quality scripts? Visit');
document.writeln('	    <a href="http://www.web-source.net/cgi-bin/t.cgi?l=wm" target="blank">Willmaster</a>');
document.writeln('	    and check out his highly acclaimed Master Series scripts. Some free, some');
document.writeln('	    for a fee. </font></td>');
document.writeln('	</tr>');
document.writeln('      </table>');
document.writeln('      <p align=Center>Sponsor');
document.writeln('        Message:<a href="http://www.webdesignmastery.com" target="blank"><font face="Verdana,Helvetica" size="2"></font><br>');
document.writeln('          <img src="http://www.web-source.net/graphics/wdm_ad2.gif"');
document.writeln('		  border="0" width="300" height="106" /></a><br />');
document.writeln('          <font face="Verdana,Helvetica" size="2"><a href="http://www.webdesignmastery.com"');
document.writeln('		  target="blank">Visit the Web Design Mastery site to<br />');
document.writeln('            download your free chapters (77');
document.writeln('            pages)!</a></font><br />');
document.writeln('      </p>');
document.writeln('      <center>');
document.writeln('        <table border="0" cellspacing="6" cellpadding="2" align="Center">');
document.writeln('          <tr>');
document.writeln('            <td><p align=Center> <font face="Verdana,Helvetica" size="2"><b><a href="http://www.web-source.net/?syndicator" target="blank">Content');
document.writeln('              Provided By</a></b></font><b>:</b><br />');
document.writeln('                    <a href="http://www.web-source.net/?syndicator" target="blank"><img src="http://www.web-source.net/graphics/ws_syn.gif"');
document.writeln('		  border="0" width="153" height="72" /></a></p></td>');
document.writeln('          </tr>');
document.writeln('        </table>');
document.writeln('      </center>');
document.writeln('      </td>');
document.writeln('  </tr>');
document.writeln('</table>');
// -->
