submit button

hello…

i have a question about how to update profile page using ajax


this is my controller(MainController.php)

public function actionProfile() {

    //get current user dept id


    $dept_id = Yii::app()->user->profile->dept_id;


    //get department model


    $DeptModel = Department::model()->findByPk($dept_id);


    $dept_name = $DeptModel->dept_name;





    //get current user role id


    $role_id = Yii::app()->user->profile->role_id;


    //get role model


    $RoleModel = Role::model()->findByPk($role_id);


    $role_name = $RoleModel->role_name;





    $this->render('profile-page', compact("title", "dept_name", "role_name", "ic_no"));


}

and this is my view(profile-page.php)

<div class="tile-body tab-content rounded-bottom-corners">

			&lt;?php


			  &#036;form = &#036;this-&gt;beginWidget('CActiveForm', array(


				'id'=&gt;'form',  //form-id


				'enableAjaxValidation'=&gt;true,


				'clientOptions'=&gt;array(


				  'validateOnSubmit'=&gt;true,


				 ),


			 ));


			?&gt;


                &#60;&#33;-- Tab panes --&#62;                 


                &lt;div id=&quot;profile-tab&quot; class=&quot;tab-pane fade in active&quot;&gt;


                    &lt;form&gt;							


                        &lt;div class=&quot;row&quot;&gt;


                            &lt;div class=&quot;form-group col-md-12 legend&quot;&gt;


                                &lt;h4&gt;&lt;strong&gt;Personal&lt;/strong&gt; Settings&lt;/h4&gt;


                                &lt;p&gt;Your personal account settings&lt;/p&gt;


                            &lt;/div&gt;


                        &lt;/div&gt;





                        &#60;&#33;--form 1--&#62;


                        &lt;div class=&quot;row&quot;&gt;


                            &lt;div class=&quot;form-group col-sm-12&quot;&gt;


                                &lt;label for=&quot;first-name&quot;&gt;Name&lt;/label&gt;


                                &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;name&quot; placeholder=&quot;&lt;?= Yii::app()-&gt;user-&gt;profile-&gt;user_name ?&gt;&quot;&gt;


                            &lt;/div&gt;


                        &lt;/div&gt;





                        &#60;&#33;--form 2--&#62;									


                        &lt;div class=&quot;row&quot;&gt;								


                            &lt;div class=&quot;form-group col-sm-6&quot;&gt;


                                &lt;label for=&quot;user_nric&quot;&gt;Ic Number&lt;/label&gt;


                                &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;ic_no&quot; placeholder=&quot;&lt;?= Yii::app()-&gt;user-&gt;profile-&gt;user_nric ?&gt;&quot;&gt;


                            &lt;/div&gt;





                            &lt;div class=&quot;form-group col-sm-6&quot;&gt;


                                &lt;label for=&quot;staff_no&quot;&gt;Staff No&lt;/label&gt;


                                &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;zip&quot; placeholder=&quot;&lt;?= Yii::app()-&gt;user-&gt;profile-&gt;staff_no ?&gt;&quot;&gt;


                            &lt;/div&gt;


                        &lt;/div&gt;





                        &#60;&#33;--form 5--&#62;


                        &lt;div class=&quot;row&quot;&gt;					


                            &lt;div class=&quot;form-group col-sm-6&quot;&gt;


                                &lt;label for=&quot;email&quot;&gt;E-mail&lt;/label&gt;


                                &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;email&quot; placeholder=&quot;&lt;?= Yii::app()-&gt;user-&gt;profile-&gt;user_email ?&gt;&quot;&gt;


                            &lt;/div&gt;





                            &lt;div class=&quot;form-group col-sm-6&quot;&gt;


                                &lt;label for=&quot;contact_no&quot;&gt;Contact No&lt;/label&gt;


                                &lt;input type=&quot;text&quot; class=&quot;form-control&quot; id=&quot;phone&quot; placeholder=&quot;&lt;?= Yii::app()-&gt;user-&gt;profile-&gt;user_contact_no ?&gt;&quot;&gt;                     


                            &lt;/div&gt;	   


                        &lt;/div&gt;





                        &#60;&#33;--form 6--&#62;


                        &lt;div class=&quot;row&quot;&gt;


                            &lt;div class=&quot;form-group col-sm-6&quot;&gt;


                                &lt;label for=&quot;avatar&quot;&gt;Profile Image&lt;/label&gt;


                                &lt;div class=&quot;input-group&quot;&gt;


                                    &lt;span class=&quot;input-group-btn&quot;&gt;


                                        &lt;span class=&quot;btn btn-primary btn-file&quot;&gt;


                                            &lt;i class=&quot;fa fa-upload&quot;&gt;&lt;/i&gt;&lt;input type=&quot;file&quot; multiple=&quot;&quot;&gt;


                                        &lt;/span&gt;


                                    &lt;/span&gt;


                                    &lt;input type=&quot;text&quot; class=&quot;form-control&quot; readonly=&quot;&quot; id=&quot;profile image&quot;&gt;


                                &lt;/div&gt;


                                &lt;span class=&quot;help-block&quot;&gt;Allowed files: gif, png, jpg. Max file size 1Mb&lt;/span&gt;


                            &lt;/div&gt;


                        &lt;/div&gt;





                        &#60;&#33;--form 7--&#62;


                        &lt;label for=&quot;bio&quot;&gt;Bio&lt;/label&gt;


                        &lt;div class=&quot;profile-form&quot;&gt;


                            &lt;textarea class=&quot;form-control&quot; placeholder=&quot;Say something?&quot; rows=&quot;5&quot;&gt;&lt;/textarea&gt;


                            &lt;div class=&quot;post-toolbar&quot;&gt;


                                &lt;a href=&quot;#&quot; title=&quot;Add File&quot;&gt;&lt;i class=&quot;fa fa-paperclip&quot;&gt;&lt;/i&gt;&lt;/a&gt;


                                &lt;a href=&quot;#&quot; title=&quot;Add Image&quot;&gt;&lt;i class=&quot;fa fa-camera&quot;&gt;&lt;/i&gt;&lt;/a&gt;


                            &lt;/div&gt;


                        &lt;/div&gt;





                        &#60;&#33;--form 8--&#62;								


                        &lt;div class=&quot;row&quot;&gt;


                            &lt;div class=&quot;col-sm-offset-4 col-sm-8&quot;&gt;


                                &lt;button type=&quot;save&quot; name=&quot;save&quot; class=&quot;btn btn-greensea&quot;&gt;Save&lt;/button&gt;


                                &lt;button type=&quot;reset&quot; class=&quot;btn btn-red&quot;&gt;Reset&lt;/button&gt;


								


                            &lt;/div&gt;


                        &lt;/div&gt;





                    &lt;/form&gt;





                &lt;/div&gt;

But these codes can’t save data to database. Any wrong ?

can anybody can teach me?

and what the correct coding that i must put?

this my output