0

I am Beginner of Magento I want to create New Module that time in controller they used some code

if ($this->getRequest()->isPost()){
    $int1 = $this->getRequest()->getPost('int1');
    $int2 = $this->getRequest()->getPost('int2');
  }

I followed this link http://blog.baobaz.com/en/blog/magento-module-create-your-own-controller

Can you please suggest any basic tutorial for creating form

1

$this->getRequest()->isPost() is use for check current request type post method ($_POST)

Using $this->getRequest()->getPost('int1') is used for getting data from post request..Just like php $_POST['int1']

Edited:

as per as your request.

$this->renderLayout(); get layout output and process this output to response body and append response

$this->loadLayout(); loading layout and creates XML tree .

  • thanks for quick reply for this $this->loadLayout(); $this->_initLayoutMessages('customer/session'); $this->renderLayout(); – user31402 Feb 23 '16 at 16:07
  • Thanks But i can't understand this $this->loadLayout(); – user31402 Feb 23 '16 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy