VDaemon PHP Library | VDaemon Extension | Table of Contents

VDaemon Tutorial
Step 6 - Form processing page

During this step we will create script that will process submitted form data. In fact, you just need to add a couple of lines of VDaemon specific code into common page you use for form processing. In the very beginning of page you should include vdaemon.php file. No custom code should appear before that include. The only code which can go before is defining of VDAEMON_PARSE constant. Set it to false to say VDaemon do not parse any form on current page. Typically you need it if current page doesn't contain any vdaemon form.

<?php
define('VDAEMON_PARSE', false);
include('vdaemon.php');

// Your code goes here
// For example you can send submited data to your e-mail
?>
<html>
<head>
<title>Validation Sample</title>
<style type="text/css">
<!--
.default
{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold
}
-->
</style>
</head>
<body>
<p class="default">Your data successfuly processed</p>
<table cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td width="100" class="default">
       Your Name:
    </td>
    <td width="300" class="default">
      <?php echo $_POST['Name']; ?>
    </td>
  </tr>
  <tr>
    <td width="100" class="default">
      Your E-mail:
    </td>
    <td width="300" class="default">
      <?php echo $_POST['Email']; ?>
    </td>
  </tr>
  <tr>
    <td width="100" class="default">
      Your Message:
    </td>
    <td width="300" class="default">
      <?php echo $_POST['Message']; ?>
    </td>
  </tr>
</table>
</body>
</html>

Congratulations! You have completed the tutorial and we hope that you are ready to create your own form validation solutions using VDaemon. Do not forget to visit the X-code web site from time to time for updates to the VDaemon family of products.