Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What is the purpose of a CSRF token in a PHP form?

  1. A To verify that the request originated from your own site
  2. B To encrypt form data
  3. C To validate the email format
  4. 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.

All Php MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as