Login   Register  
PHP Classes
elePHPant
Icontem

File: test_sequential_form.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Manuel Lemos  >  Multipage forms class  >  test_sequential_form.php  >  Download  
File: test_sequential_form.php
Role: Example script
Content type: text/plain
Description: Example page script to demonstrate multipage forms in sequential mode
Class: Multipage forms class
Create and manage forms split over multiple pages.
Author: By
Last change:
Date: 13 years ago
Size: 1,251 bytes
 

Contents

Class file image Download
<?
/*
 * test_sequential_form.html
 *
 * @(#) $Header: /cvsroot/PHPlibrary/test_sequential_form.html,v 1.1 2000/11/20 03:52:44 mlemos Exp $
 *
 */

?><HTML>
<HEAD>
<TITLE>Test for Manuel Lemos' PHP paged form class - Sequential access</TITLE>
</HEAD>
<BODY>
<H1><CENTER>Test for Manuel Lemos' PHP paged form class - Sequential access</CENTER></H1>
<HR>
<?
 
require("forms.php");
 require(
"pagedformclass.php");
 require(
"subscriptionclass.php");

 
$subscription=new subscription_class;
 if(
$subscription->load())
 {
  if(
$subscription->finished)
  {
   echo 
"<H2><CENTER>".HtmlEntities($subscription->paged_form_object->GetInputValue("user_name")).", thank you for having submitted your subscription.</CENTER></H2>\n";
   echo 
"<P><CENTER><A HREF=\"$PHP_SELF\">Restart</CENTER></P>\n";
  }
  else
  {
   if(
$subscription->canceled)
   {
    echo 
"<H2><CENTER>The submission of your subscription was canceled.</CENTER></H2>\n";
    echo 
"<P><CENTER><A HREF=\"$PHP_SELF\">Restart</CENTER></P>\n";
   }
   else
   {
    echo 
"<H2><CENTER>".HtmlEntities($subscription->page_names[$subscription->page])."</CENTER></H2>\n";
    echo 
$subscription->outputform();
   }
  }
 }
 else
  echo 
"<H2>Error: ".$subscription->error."</H2>\n";
?>
<HR>
</BODY>
</HTML>