Skip to main content
edited body
Source Link
Qaisar Satti
  • 32.5k
  • 18
  • 87
  • 137

$postData['category'] this will be your database table column name and $this->getRequest()->getPost('category') your form field name. implode function will be add , between the values.

$postData['category'] = implode(',',$this->getRequest()->getPost('category')); 

add in controller.php in saveAction

 $model = Mage::getModel('brand/brand');
 $data['category']$data['products'] = implode(',',$this->getRequest()->getPost('category')); 
        $model->setData($data);
 

$postData['category'] this will be your database table column name and $this->getRequest()->getPost('category') your form field name. implode function will be add , between the values.

$postData['category'] = implode(',',$this->getRequest()->getPost('category')); 

add in controller.php in saveAction

 $model = Mage::getModel('brand/brand');
 $data['category'] = implode(',',$this->getRequest()->getPost('category')); 
        $model->setData($data);
 

$postData['category'] this will be your database table column name and $this->getRequest()->getPost('category') your form field name. implode function will be add , between the values.

$postData['category'] = implode(',',$this->getRequest()->getPost('category')); 

add in controller.php in saveAction

 $model = Mage::getModel('brand/brand');
 $data['products'] = implode(',',$this->getRequest()->getPost('category')); 
        $model->setData($data);
 
added 212 characters in body
Source Link
Qaisar Satti
  • 32.5k
  • 18
  • 87
  • 137

$postData['category'] this will be your database table column name and $this->getRequest()->getPost('category') your form field name. implode function will be add , between the values.

$postData['category'] = implode(',',$this->getRequest()->getPost('category')); 

add in controller.php in saveAction

 $model = Mage::getModel('brand/brand');
 $data['category'] = implode(',',$this->getRequest()->getPost('category')); 
        $model->setData($data);
 

$postData['category'] this will be your database table column name and $this->getRequest()->getPost('category') your form field name. implode function will be add , between the values.

$postData['category'] = implode(',',$this->getRequest()->getPost('category')); 

$postData['category'] this will be your database table column name and $this->getRequest()->getPost('category') your form field name. implode function will be add , between the values.

$postData['category'] = implode(',',$this->getRequest()->getPost('category')); 

add in controller.php in saveAction

 $model = Mage::getModel('brand/brand');
 $data['category'] = implode(',',$this->getRequest()->getPost('category')); 
        $model->setData($data);
 
Source Link
Qaisar Satti
  • 32.5k
  • 18
  • 87
  • 137

$postData['category'] this will be your database table column name and $this->getRequest()->getPost('category') your form field name. implode function will be add , between the values.

$postData['category'] = implode(',',$this->getRequest()->getPost('category'));