Location: PHPKode > scripts > writedocMail > writedocmail/writedocMail/index.htm
<html>
<head>
<title>WriteDoc: PHP-based Form Processor (writedocMail.php)</title>
<meta name="copyright" content="Copyright 1996-2003, WriteDoc. All rights reserved.">
<meta name="author" content="Malcolm Graham, WriteDoc (http://writedoc.com/)">
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#330066" vlink="#000000" alink="#009900" onLoad="MM_preloadImages('../../images/ndisk.gif')">
<table cellpadding="9" border="0" width="99%">
  <tr valign=top align="left"> 
    <td><div align="left"><font color="#990000"><a href="../index.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('downloads','','../../images/ndisk.gif',1)"><img src="../../images/disk.gif" alt="Click to return..." name="downloads" width="33" height="33" border="0"></a><img src="../../images/writedocMail.gif" width="500" height="40" align="absmiddle"></font></div></td>
  </tr>
  <tr valign=top align="left"> 
    <td>
<table cellpadding="3" border="1" width="100%" bordercolorlight="#CCFFFF">
        <tr valign=top align="left"> 
          <td width="15%" bgcolor="#FFFFCC"><div align="center"><font face="Arial, sans-serif"><a href="writedocMail.zip">writedocMail</a></font><font size="-1" face="Arial, sans-serif"><a href="writedocMail.zip"><br>
              </a><font size="-2">(click to download)</font></font></div></td>
          <td width="84%" bgcolor="#CCFFFF"><p><font face="Times New Roman, serif">Downloadable<strong> 
              </strong><a href="http://www.php.net/" target="_blank">PHP-based</a><strong> 
              Form Processor with required field checking and input validation</strong>. 
              View the <a href="ReadMe.txt" target="_self">ReadMe</a> and the 
              sample <a href="feedback.htm" target="_self">form</a>, <a href="responses/formError1.htm" target="_self">error</a>, 
              &amp; <a href="responses/formSuccess.htm" target="_self">success</a> 
              pages. </font></p>
            </td>
        </tr>
        <tr valign=top align="left">
          <td bgcolor="#FFFFCC"><div align="right"><strong><font color="#990000" face="Arial, sans-serif">Description</font></strong></div></td>
          <td bgcolor="#CCFFFF"><p><font face="Times New Roman, serif">The <strong>writedocMail.php</strong> 
              script provides a basic PHP-based form processor with checking for 
              required fields and user input validation. It is very simple to 
              configure if the forms supplied are used, all you need to do is 
              add the email address that you want the feedback results forwarded 
              to. Since this is a PHP script, which can't be viewed by web browsers, 
              with your email address inside, the script offers some privacy and 
              security because spam programs can't automatically retrieve your 
              email and add it to their spam lists. Instructions are included 
              for handling forms with more fields than those included in the sample 
              form. </font></p>
            <p><font face="Times New Roman, serif">The script is offered as is 
              and no support is offered. For help in using PHP, see <a href="http://www.php.net/" target="_blank">http://www.php.net/</a>, 
              <a href="http://www.hotscripts.com/" target="_blank">http://www.hotscripts.com/</a>, 
              <a href="http://www.devscripts.com/" target="_blank">http://www.devscripts.com/</a>, 
              or <a href="http://www.phpfreaks.com/" target="_blank">http://www.phpfreaks.com/</a></font></p>
            <p><strong><font color="#990000" face="Arial, sans-serif">Files provided...</font></strong> 
              <br>
              <strong>writedocMail.php</strong>: is the PHP script, stored in 
              the <em>script</em> folder<br>
              <strong>feedback.htm</strong>: sample feedback form <br>
              <strong>formSuccess.htm</strong>: sample successful form processing 
              page in <em>responses</em> folder <br>
              <strong>formError1.htm</strong>: sample form processing error page 
              in <em>responses</em> folder <br>
              <strong>formError2.htm</strong>: sample form processing error page 
              in <em>responses</em> folder <br>
              <strong>formError3.htm</strong>: sample form processing error page 
              in <em>responses</em> folder <br>
              <strong>formError4.htm</strong>: sample form processing error page 
              in <em>responses</em> folder <br>
              <em>images</em> folder: contains the images used in the sample pages 
            </p>
            <p><font color="#990000" face="Times New Roman, serif"><strong><font face="Arial, sans-serif">Requirements...</font></strong></font><font face="Times New Roman, serif"><br>
                <strong>PHP</strong> must be installed on your web host's server and <em>register_globals</em>              must
                be enabled.</font></p>
            <p><strong><font color="#990000" face="Arial, sans-serif">Basic instructions...</font></strong><br>
              <font face="Times New Roman, serif">After decompressing the downloaded 
              <strong>writedocMail.zip</strong> file, edit the <strong>writedocMail.php</strong> 
              file and change <strong>$mailTo</strong> to specify your email address. 
              If you plan to use the sample pages provided, simply move the <strong>writedocMail</strong> 
              folder to your server and call the <strong>feedback.htm</strong> 
              file from any web page. </font></p>
            <p><font face="Arial, sans-serif"><strong><font color="#990000">Detailed 
              instructions...</font></strong></font></p>
            <ol>
              <li>Download and decompress the <strong>writedocMail.zip</strong> 
                file</li>
              <li><font face="Times New Roman, serif">C</font><font face="Times New Roman, serif">hange 
                the <strong>$mailTo</strong> text, within the <strong>writedocMail.php</strong> 
                file, to your email address<br>
                Jump to <em>Step10</em>, if you are using the sample form (<strong>feedback.htm</strong>) 
                and files</font></li>
              <li><font face="Times New Roman, serif">Create your <em>Form</em> 
                with link to this file as the Form's <strong>POST</strong> Action</font></li>
              <li><font face="Times New Roman, serif">Change <strong>$msgSubject</strong> 
                text to what you want</font></li>
              <li><font face="Times New Roman, serif">Change <strong>$formSuccess</strong> 
                to location of your successful form submission page</font></li>
              <li><font face="Times New Roman, serif">Change/Add <strong>$formError</strong> 
                to location of your form processing error pages </font></li>
              <li><font face="Times New Roman, serif">Add a variable for all fields 
                in your form</font></li>
              <li><font face="Times New Roman, serif">Add <em>case</em> statements 
                for every user-input field in your form</font></li>
              <li><font face="Times New Roman, serif">Add your form <em>field-names</em> 
                and associated <em>$variable-name</em> to <strong>msgBody</strong> 
                </font></li>
              <li><font face="Times New Roman, serif">Save the <strong>writedocMail.php</strong> 
                file in the <em>script</em> folder within the <strong>writedocMail 
                </strong>folder</font></li>
              <li><font face="Times New Roman, serif">Move the <strong>writedocMail</strong> 
                folder to your server and call your form from any web page</font><br>
              </li>
            </ol>
            </td>
        </tr>
      </table>
      <p> </td>
  </tr>
  <tr valign=top align="left"> 
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>








Return current item: writedocMail