echo $this->getBlockHtml('formkey'); // show a form hidden input field.
echo htmlspecialchars($this->getBlockHtml('formkey'));
Method 2:
$_formKey = Mage::getSingleton('core/session')->getFormKey();
echo '<input name="form_key" type="hidden" value="' . $_formKey . '">';
No comments:
Post a Comment