PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Herman Veluwenkamp   form_template   test.php   Download  
File: test.php
Role: ???
Content type: text/plain
Description: Demo to test class.
Class: form_template
Form generation and validation class.
Author: By
Last change:
Date: 23 years ago
Size: 1,053 bytes
 

Contents

Class file image Download
<? include 'functions.inc'; include 'table.inc'; include 'form_template.inc'; ?> <html> <head><title>Form Template Test</title> <LINK HREF="test.css" REL="stylesheet" TYPE="text/css"> <SCRIPT LANGUAGE="JavaScript1.2" SRC="validate.js"></SCRIPT> <? $form = new form_template; $form->conf_file_name = 'test.conf'; $form->initialise(); echo $form->javascript_validation_array; // print array that contains validation info for all fields. ?> </head> <body> <? if (isset($HTTP_POST_VARS) and ($form_action!='cancel')) { $form->validate($HTTP_POST_VARS); $form->make_table(); if (isset($form->validation_error)) { print("<H2>Validation Error</H2>"); print $form->table; } else if ($form_action=='apply') print $form->table; //print table if we selected "apply". } else { $form->make_table(); print $form->table; } if (isset($HTTP_POST_VARS)) { // print returned vars. print('<PRE>'); print_r($HTTP_POST_VARS); print('</PRE>'); } ?> </body> </html>