Login   Register  
PHP Classes
elePHPant
Icontem

File: example_tiny.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Thiemo Mättig  >  TM::Apeform  >  example_tiny.php  >  Download  
File: example_tiny.php
Role: Example script
Content type: text/plain
Description: Basic textarea example
Class: TM::Apeform
A very abstract web form builder and processor
Author: By
Last change: Updated
Date: 5 years ago
Size: 470 bytes
 

Contents

Class file image Download
<?php

/**
 * Tiny form example. Shows basic use of textarea, error, submit, isValid and
 * display.
 *
 * @author Thiemo Mättig (http://maettig.com/)
 */

require_once("Apeform.class.php");
$form = new Apeform();

$message $form->textarea("Something");
if (empty(
$message))
{
    
$form->error("Please enter something");
}

$form->submit("Submit something");

if (
$form->isValid())
{
    echo 
"Thank you!";
}
else
{
    
$form->display();
}