Location: PHPKode > scripts > mraiur_var_security > example.php
<?php
$current_dir = dirname(__FILE__) . "/";
require_once $current_dir . "mraiur_var_security.php";
/** INIT **/
$var_secure = new mraiur_var_security();

//** SECURE STRING **/
?>
<form action="" method="post">
<input type="hidden" name="hid_post"/>
<input type="text" name="var_to_secure" /><input type="submit" value="submit to secure" />
<?php
if( isset($_POST['hid_post']) )
{
    ?>
    <table style="padding: 5px; border:solid green 1px;">
        <tr>
            <td>STRING (all strings) :</td>
            <td><?=$var_secure->post('var_to_secure')?></td>
        </tr>
        <tr>
            <td>INT ( decimal 0-9 ) :</td>
            <td><?=$var_secure->post('var_to_secure', "int")?></td>
        </tr>
        <tr>
            <td>Double ( decimal 5.20 ) :</td>
            <td><?=$var_secure->post('var_to_secure', "double")?></td>
        </tr>
    </table>
    <?php
}
?>
</form>
Return current item: mraiur_var_security