How to add CSRF to manually created form in wordPress?

Posted by Prem Tiwari | Updated on

If you want to add CSRF to manually created form in wordPress? If you are using WordPress 2.0.4 or above you can use wp_nonce_field and wp_verify_nonce field to verify. The WordPress documentation has some examples (which I posted below).

In your form:

In your processing action:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers