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.
-
are you creating the module or you want the core hack?– Qaisar SattiCommented Oct 8, 2015 at 7:06
-
Wouldn't suggest a "core hack"! - you know he's watching...– BENN1THCommented Oct 8, 2015 at 7:09
-
How we can do it with module.– MathewCommented Oct 8, 2015 at 7:12
-
you can use observer for this adminhtml_customer_save_after event it will give customer data.– Qaisar SattiCommented Oct 8, 2015 at 7:17
-
Can you provide full procedure, i access saveAction in the customer controller i am new in magento.– MathewCommented Oct 8, 2015 at 7:21
|
Show 1 more comment
1 Answer
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..