code for Button

I m new in Yii . I hve given a button in post view page now I want to write code for insertion in some other table.actually i m doing for job portals and in post view page button is for appliyng the perticular job and I want to insert the userid,useremail,uername and postjob id and postjob title.pls help me

<?php

$form=$this->beginWidget(‘CActiveForm’, array(‘id’=>‘form’,‘enableClientValidation’=>true,

	'clientOptions'=&gt;array('validateOnSubmit'=&gt;true,),

));

?>

Add Required Controls here and Put inside

$form->

<?php

			 &#036;this-&gt;widget('zii.widgets.jui.CJuiButton', array('buttonType'=&gt;'submit','name'=&gt;'btnSubmit',


		        	'value'=&gt;'Submit',


					'caption'=&gt;&#036;model-&gt;isNewRecord ? 'Create' : 'Save',


					)


					


					); 


		?&gt;

now in Controller u can Handle event Action

thanks for providing code for the buttons

===============