Demo Custom CSRF Token in PHP
Sample Login Form
Note: To test the demo of CSRF token, simply inspect the code and locate the hidden input field _token change its value and submit the form, you will get the error if the token value does not match with the session token.