<?php
require_once 'init.php';
$security = new CSRF();
$security->DeleteUnnecessaryTokens();
if (is_submit('submit')) {
//i use my input class you can as well use _GET or _POST method thanks
if ($security->Verify(input('token'))) {
$security->Delete(input('token'));
echo '<div class="container">'.restore_new_lines(input('q')).'</div>';
} else {
echo 'invilid request';
}
}
//only for debug purpose
//$security->Debug();
|