Beispiel #1
0
// -----------------------------------------------------------------------
//
// Use the form and check it status.
//
session_name('cform_example');
session_start();
$form = new CFormContact();
// Check the status of the form
$status = $form->Check();
// What to do if the form was submitted?
if ($status === true) {
    $form->AddOUtput("<p><i>Form was submitted and the callback method returned true.</i></p>");
    header("Location: " . $_SERVER['PHP_SELF']);
} else {
    if ($status === false) {
        $form->AddOutput("<p><i>Form was submitted and the Check() method returned false.</i></p>");
        header("Location: " . $_SERVER['PHP_SELF']);
    }
}
?>


<!doctype html>
<meta charset=utf8>
<title>CForm Example: Basic example on how to use CForm (part 5)</title>
<h1>CForm Example: Basic example on how to use CForm (part 5)</h1>
<?php 
echo $form->GetHTML();
?>