How to store the value entered in textArea to DB

Hi

I have a text box in which user will be able to enter text and when I click the "OK" then the user entered input should be stored in DB. How to accomplish this?

[size="7"][font="Arial Black"]View:[/font][/size]

‘Delete’=>array(

																				'label'=>'Delete',


																				'url'=>'CController::createUrl("/prf/deleteRecord", array("prfnumber"=>$data->prf_number))',


																				'visible'=>'(Yii::app()->user->type == 6 AND $data->nacknowledged==4) OR Yii::app()->user->type == 1 ',


																					'click'=>'function(){deleteUrl = $(this).attr("href");$("#deleteDialog").dialog("open"); return false;}',	


																						


																			),


																),


										


									),


	


	


		)); 

$this->beginWidget(‘zii.widgets.jui.CJuiDialog’,array(

			'id'=>'deleteDialog',


			'options'=>array(


   		'title'=>'Delete Reason',


   		'autoOpen'=>false,


    		'modal'=>true,


    		'closeOnEscape'=>true,


    		'buttons' => array(


    array('text'=>'Ok','click'=>'js:function(){deleteUrl = deleteUrl+"&message="+$("#message").text(); window.location.href = deleteUrl;}','onclick' =>'Save()'),


    array('text'=>'Cancel','click'=> 'js:function(){$(this).dialog("close");}'),


),


    		'width'=>'350',


    		'height'=>'200',


    		'show'=>array('effect'=>'fold','duration'=>100),


								),


						));

echo ‘<form id=“frmDelete” method=“GET”>’;

echo ‘<span>comments</span><br/>’;

    echo CHtml::textArea('message');  // this generate the textArea

echo ‘</form>’;

$this->endWidget(‘zii.widgets.jui.CJuiDialog’);

[size="7"][font="Arial Black"]Controller[/font][/size]

public function actionDeleteRecord()

 {


 	&#036;modelPrf = &#036;this-&gt;loadModel(&#036;_GET['prfnumber']);


 	&#036;modelAnn = Annletter::model()-&gt;findAll('prfnumber=:prfnumber',array('prfnumber'=&gt;&#036;_GET['prfnumber']));


 	&#036;modelClaim = ClaimAmount::model()-&gt;findAll('prf=:prf',array('prf'=&gt;&#036;_GET['prfnumber']));


 	 


 	//Copy Delete into Register


 	&#036;modelDelete = new Prfdeleted() ;


 	&#036;modelDelete-&gt;attributes = &#036;modelPrf-&gt;attributes;


	


 	&#036;modelDelete-&gt;prf_startdate = date('Y-m-d',strtotime(&#036;modelPrf-&gt;prf_startdate));


 	&#036;modelDelete-&gt;deletedBy = Yii::app()-&gt;user-&gt;name;


 	&#036;modelDelete-&gt;deletedTime = date('Y-m-d H:m:s');


 	&#036;modelDelete-&gt;save();


 	if (&#036;modelAnn &#33;= null ) 	


 	{


 		&#036;count = count(&#036;modelClaim);


 		for (&#036;i=0;&#036;i&lt;&#036;count;&#036;i++)


 		{


 			Annletter::sendEmail('emailIntDeleteRecord',array('modelPrf'=&gt;&#036;modelPrf),'PROGRAM REVOKED-'.&#036;modelAnn[&#036;i]-&gt;prfnumber,Users::getBPEmail(&#036;modelAnn[&#036;i]-&gt;bpname,&#036;modelAnn[&#036;i]-&gt;segment ));


 			&#036;modelAnn[&#036;i]-&gt;delete();


 			&#036;modelClaim[&#036;i]-&gt;delete();


 		}


 		//Send Email to BP and Internal


 		Annletter::sendEmail('emailIntDeleteRecord',array('modelPrf'=&gt;&#036;modelPrf),'PROGRAM REVOKED-'.&#036;modelPrf-&gt;prf_number,Users::getEmail(&#036;modelPrf-&gt;bp_country,'2',&#036;modelPrf-&gt;segment));


 		Annletter::sendEmail('emailIntDeleteRecord',array('modelPrf'=&gt;&#036;modelPrf),'PROGRAM REVOKED-'.&#036;modelPrf-&gt;prf_number,Users::getEmail(&#036;modelPrf-&gt;bp_country,'3',&#036;modelPrf-&gt;segment));


 		Annletter::sendEmail('emailIntDeleteRecord',array('modelPrf'=&gt;&#036;modelPrf),'PROGRAM REVOKED-'.&#036;modelPrf-&gt;prf_number,Users::getEmail(&#036;modelPrf-&gt;bp_country,'4',&#036;modelPrf-&gt;segment));


 		Annletter::sendEmail('emailIntDeleteRecord',array('modelPrf'=&gt;&#036;modelPrf),'PROGRAM REVOKED-'.&#036;modelPrf-&gt;prf_number,Users::getEmail(&#036;modelPrf-&gt;bp_country,'6',&#036;modelPrf-&gt;segment));


 		&#036;modelPrf-&gt;delete();


 	}


 	else


 	{


 		//Send Email to Internal Only


 		Annletter::sendEmail('emailIntDeleteRecord',array('modelPrf'=&gt;&#036;modelPrf),'PROGRAM REVOKED-'.&#036;modelPrf-&gt;prf_number,Users::getEmail(&#036;modelPrf-&gt;bp_country,'2',&#036;modelPrf-&gt;segment));


 		Annletter::sendEmail('emailIntDeleteRecord',array('modelPrf'=&gt;&#036;modelPrf),'PROGRAM REVOKED-'.&#036;modelPrf-&gt;prf_number,Users::getEmail(&#036;modelPrf-&gt;bp_country,'3',&#036;modelPrf-&gt;segment));


 		Annletter::sendEmail('emailIntDeleteRecord',array('modelPrf'=&gt;&#036;modelPrf),'PROGRAM REVOKED-'.&#036;modelPrf-&gt;prf_number,Users::getEmail(&#036;modelPrf-&gt;bp_country,'4',&#036;modelPrf-&gt;segment));


 		Annletter::sendEmail('emailIntDeleteRecord',array('modelPrf'=&gt;&#036;modelPrf),'PROGRAM REVOKED-'.&#036;modelPrf-&gt;prf_number,Users::getEmail(&#036;modelPrf-&gt;bp_country,'6',&#036;modelPrf-&gt;segment));


 		&#036;modelPrf-&gt;delete();


 	}


 	&#036;this-&gt;redirect('activeCam');


 	


 }

@webin: Kindly help me

hi Mubeen,

it is Yii 1 and im not as good with Yii1.

regards,

webin

Hi bro, I can help you but is just that your doubt?.. with the scaffolding tool you can get it without write a code line… Any way I can make a little example and send it to you…