CodeIgniter Forums
CSRF Protection - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: CSRF Protection (/thread-70155.html)



CSRF Protection - donpwinston - 03-01-2018

What else do I have to besides inserting 

PHP Code:
<input type="hidden" name="<?= csrf_token() ?>" value="<?= csrf_hash() ?>" /> 

inside my form?


RE: CSRF Protection - kilishan - 03-01-2018

You could have simply used:
Code:
<?= csrf_field() ?>

The rest of the instructions are in the docs. Let me know if anything's missing there.