Skip to content

Glossary: PHP Basics

CSRF token

Also written: token

A random secret kept in the session and placed in your own form as a hidden input, then checked when the form is posted. A forged form can't know it.

Where the book teaches it

Related terms

CSRF (cross-site request forgery)hidden inputhash_equals()random_bytes()