What is the purpose of a CSRF token in a PHP form?
- A To verify that the request originated from your own site
- B To encrypt form data
- C To validate the email format
- D To compress the request
Answer
To verify that the request originated from your own site
The token must be tied to the session and compared with hash_equals. Without it, a third-party site can submit actions as a logged-in user.





