Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include 'Token.php';
- ?>
- <form method="post">
- <div><input type="text" name="number"></div>
- <input type="hidden" name="token" value="<?= Token::create() ?>"/>
- <div><input type="submit" name="submit"></div>
- </form>
- <?php
- echo $_SESSION['token'];
- if(isset($_POST['submit']) && Token::check()) {
- echo "<br>OK";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement