0

I want when from admin panel user is created then entry also inserted into my custom table. I want this information in my table which consists following structure User_id,full_name_email. Where i write insert query for my requirement.

6
  • are you creating the module or you want the core hack? Commented Oct 8, 2015 at 7:06
  • Wouldn't suggest a "core hack"! - you know he's watching...
    – BENN1TH
    Commented Oct 8, 2015 at 7:09
  • How we can do it with module.
    – Mathew
    Commented Oct 8, 2015 at 7:12
  • you can use observer for this adminhtml_customer_save_after event it will give customer data. Commented Oct 8, 2015 at 7:17
  • Can you provide full procedure, i access saveAction in the customer controller i am new in magento.
    – Mathew
    Commented Oct 8, 2015 at 7:21

1 Answer 1

1

In your controller action

$mymodel = Mage::getModel('mymodel/mymodel');

//post field id# user_id
$mymodel->setUserId($this->getRequest()->getPost('user_id'));

//post field id# full_name_email
$mymodel->setFullNameEmail($this->getRequest()->getPost('full_name_email'));

//save data
$mymodel->save();

Your question is very vague in terms of information but this is the general way to save form post data to the database tables in magento..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.