PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Muhammad Umer Farooq   PHP CSRF Token Generation   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP CSRF Token Generation
Generate tokens to protect against CSRF attacks
Author: By
Last change: Apply fixes from StyleCI
Date: 4 years ago
Size: 999 bytes


Class file image Download
<?php require_once 'start.php'; ?>
  <title>PHP Security class example 1</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
<div class="container">
  <form action='start.php' method="post">
    <div class="form-group">
        <input type='hidden' name='token' value="<?= $security->GenerateTokens(3, 20); ?>" />
      <label for="comment">Comment:</label>
      <textarea class="form-control" rows="5" name='q'></textarea>
      <input type='submit' name='submit' class="btn btn-success" value='Submit' />