If you use Gii tools, You don’t need any thing for saving. It generate all the codes you need it. It is so easy to make a huge of models, controllers, views and CRUD.
I need when user select phone option it shoul save in the database as phone and when user select telephone it shoud save in the database as telephone like wise .how to do that??
In the model file you define 2 constant for 1=mobile, 2=telephone etc.
And in the controller file:
switch($_POST['Applyjob']['type']){
case Model::mobile:
$userappliedjob->contact_method=Model::mobile;
break;
case Model::telephone:
$userappliedjob->contact_method=Model::telephone;
}