VFORMfm.CGI

Virtual Form CGI
Written by Victor T. DeCristoforo
Copyright Area 51 Consulting Inc.
BACK

Example 3

The following example will create a database , use a response page that will thank the user for their input, and format a e-mail response page.


*Name:
Gender: Male Female
*Company:
Phone:
*Email:
NOTE: Fields with a * are required



Source code for Example 3.


The following source only shows the actual FORM HTML code.

<Form action="/cgi-bin/vformfm.cgi" method="POST">
<div align="left">

<table border="0" width="50%">
<tr> <td width="50%">*Name: </td><td width="50%"> <Input type="text" name="NAME"></td></tr>
<tr> <td width="50%">Gender </td><td width="100%">
Male <Input type="radio" name="sex" value="Male" checked>
Female <Input type="radio" name="sex" value="Female" >
</td>
</tr>
<tr> <td width="50%">*Company: </td><td width="50%"> <Input type="text" name="COMPANY"></td></tr>
<tr> <td width="50%">Phone: </td><td width="50%"> <Input type="text" name="PHONE"></td></tr>
<tr> <td width="50%">*Email: </td><td width="50%"> <Input type="text" name="EMAIL"></td></tr>
</table>

</div>
<h6>NOTE: Fields with a * are required</h6>

<p>
<Input type="submit" name="Submit" value="Enter">
<Input type="reset" name="RESET" value="Clear">
</p>

<!-- The following input fields have special meaning to the CGI. -->
<Input type="hidden" name="VF_ReturnURL" value="http://www.drdebug.com">
<Input type="hidden" name="VF_REQUIRED" value="NAME, EMAIL, COMPANY">
<Input type="hidden" name="VF_MailTo" value="guru@mail.ar51.net">
<Input type="hidden" name="VF_Verify" value="/vform/VF_ex3_verify.html">

</form>


User response page sample output for Example 3.


Your response is appreciated.




User response page HTML code for Example 3.

The following source only shows the form data.

<Form action="/cgi-bin/vformfm.cgi" method="POST" name="Vform Example 3">
<input type="submit" name="ACCEPT" value="Continue">

<-- These fields are needed to pass the response data from the initial form -->

<input type="hidden" name="NAME">
<input type="hidden" name="SEX">
<input type="hidden" name="COMPANY">
<input type="hidden" name="PHONE">
<input type="hidden" name="EMAIL">

<!-- The following input fields are required -->
<Input type="hidden" name="VF_MailTo" value="guru@mail.ar51.net">
<Input type="hidden" name="VF_ReturnURL" value="http://www.drdebug.com">

<!-- The next field defines the HTML template file to use to merge the form results into. -->
<Input type="hidden" name="VF_FORMTEMPLATE" value="/vform/VF_ex3_mail.html">

<!--
This field defines the data base file name to create and which form fields to save. The file created will be in a Comma Separated Value format. This format is recognized my Microsoft Excel an Access as importable files.
-->
<Input type="hidden" name="VF_DBFIELDS" value="VF_ex3data.csv, name, sex, company, phone, email">

</form>


Example 3 e-mail response page sample output.


Web Form Response Data


We have just had a web response from user at company

Their gender is

To contact them by phone use the following number

To contact by email use the email address




Example 3 e-mail response HTML code.

This is the all the HTML code used for the e-mail response page.

<html>
<head></head>
<body>
<center>
<h3>Web Form Response Data</h3>
</center>

<form>
<!- The following field names are from the original input form -->
<p><Br>
We have just had a web response from user <input type="text" name="name"> at company <input type="text" name="company">
</p>

<p> Their gender is <input type="text" name="sex">
<Br>
<p>
To contact them by phone use the following number <input type="text" name="phone">
<Br>
<Br>
To contact <input type="text" name="name"> by email use the email address <input type="text" name="email">
</p>

</form>
</body>
</html>

 


BACK