I am using Magento 1.9.3.6 version.
I need form values in the controller which is other than form action. So I serialized the form values and set into the Magento Core session like below. When I print the Session Value it is returns empty or the variable name as value.
var samples = JSON.stringify(jQuery('#sell-add-product').serializeArray());
var a = "<?php echo Mage::getSingleton('core/session')->setMyValue("+samples+");?>";
I am getting like below in the controller:
$data = Mage::getSingleton('core/session')->getMyValue();
print_r($data);
Out put is +samples+