Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class masked_name__Adminhtml_masked_name__Controller extends Mage_Adminhtml_Controller_Action
- {
- public function indexAction()
- {
- $this->loadLayout()->renderLayout();
- }
- public function postAction()
- {
- $post = $this->getRequest()->getPost();
- try {
- if (empty($post)) {
- Mage::throwException($this->__('Invalid form data.'));
- }
- /* form processing */
- Mage::app()->getRequest()->getPost();
- $masked_value_1 = Mage::app()->getRequest()->getParam('masked_value_1');
- $masked_value_2 = Mage::app()->getRequest()->getParam('masked_value_2');
- $masked_value_3 = Mage::app()->getRequest()->getParam('masked_value_3');
- $conn = Mage::getSingleton('core/resource')->getConnection('core_write');
- $conn->query("UPDATE masked_table_name SET masked_input_1='" . $masked_value_1 . "', masked_input_2='" . $masked_value_2 . "', masked_input_3='" . $masked_value_3 . "' WHERE id='10'");
- $message = $this->__('Landed price variable have been successfully updated.');
- Mage::getSingleton('adminhtml/session')->addSuccess($message);
- } catch (Exception $e) {
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
- }
- $this->_redirect('*/*');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement