How to generate formkey in Magento and send a POST request?

by Jishnu   Last Updated October 19, 2019 16:09 PM - source

Magento uses some sort of form key to send POST data. I want to send POST data to a controller in Magento and receive it. How do I do that?



Answers 2


Try Mage::getSingleton('core/session')->getFormKey() to get a valid form key.

DerFrey
DerFrey
September 24, 2016 19:13 PM

I am new to Magento. Can I do this from an API? If so should I include some class or file? Can you share some sample code?

Ramanan
Ramanan
October 19, 2019 15:58 PM

Related Questions



Take values input form Magento view.phtml

Updated February 23, 2019 10:09 AM