Sample> NotEmpty

<?php

// include TPLN
include('TPLN/TPLN.php');

$TPLN = new TPLN();

$TPLN->open('notEmpty.html');
$TPLN->formSetLang('en');

// treatment of form
$TPLN->formSetObjectNames(array('text' => "My text"'checkbox[]' => "Your choice")); // customize your input
$TPLN->notEmpty(array('text''checkbox[]'));

if(
$TPLN->formIsValid())
{
    
// treatment
}

$TPLN->write();

?>
<html>
<head>
    <title>notEmpty.html </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>

    <form action="" method="post" name="form">
    <p>Please fill this field :
    <br>
    <br>
        <input type="text" name="text" id="text" value="">
    </p>

    <p>Also check a box :
    <br>
    <br>
        <input name="checkbox[]" type="checkbox" id="checkbox" value="1"> Yes
        <input name="checkbox[]" type="checkbox" id="checkbox" value="2"> No
    </p>
    <p>
        <input type="submit" name="button1" value="Send" id="button1">
    </p>

    </form>

    <bloc::form_valid>
    <div id="form_valid">
    Your form was submitted without errors !<br>
    And replaced by bloc form_valid !
    </div>
    </bloc::form_valid>

    <br>
    <br>
    {_Logo}<font size="1"> in {_Chrono} s<br>
    Queries executed: {_QueryCount}</font>

</body>
</html>