View Full Version : how to work button

16 Jul 2012, 6:50 PM
very simple one.

if the user enter a text and send it,

it has to be inserted into the DB.

I made it by myself. But it is not working.

entered text aren't saved into the DB.

Help me plz :)

1. UI

var formRegister = new Ext.FormPanel({
frame: true, border: false, buttonAlign: 'center',
method: 'POST', id: 'frmRegister',url: BASE_URL + 'user/addAction',
bodyStyle: 'padding:10px 10px 15px 15px;background:#dfe8f6;',
width: 300, labelWidth: 150,
items: [{
xtype: 'textfield',
fieldLabel: 'Enter New action',
name: 'actionName',
id: 'actionName'

buttons: [
{ text: 'Save', }


2. Controller(codeigniter)

public function addAction(){
$data = array(
'actionName' => $_POST['actionName']


echo "{success:true}";

16 Jul 2012, 7:01 PM
i had to make a handler :)