Yii Form Insertin Problem

hi

< $model=new Apps;

	&#036;model-&gt;attributes=&#036;_POST['Apps'];


		&#036;password = &#036;model-&gt;password;


		&#036;model-&gt;password = &#036;model-&gt;hashPassword(&#036;user-&gt;password);


		&#036;model-&gt;date_joined = date('Y-m-d');


		&#036;model-&gt;code =&#036;model-&gt;username ;


		&#036;model-&gt;icon_name ='fert';


		&#036;model-&gt;signup_ip = '121222';


		&#036;model-&gt;is_active =1;


		


		


		if(&#036;model-&gt;save())


		Yii::app()-&gt;user-&gt;setFlash('save', 'Your information is saved use username password to login');


			&#036;this-&gt;redirect(array('site/login'));&gt;

this is code of my actionCreate some of fields are coming from view form and some of i am giving in manually

whole table has 71 fields so i can not take all fileds from user at a time so only required fields there please help me to sort out this thing i have faced this problem in my two yii projects…

Not quite clear what’s the problem.

Consider using mass-assignment ($model->attributes = $_POST[‘Model’]) and validation rules.

actually there are 71 fields in the table only ten are required when i post those required fields on through a form other 60 fields left blank yii defualt insert $model->attributes array loads all fields and not allow insertion.

ok got it if($model->save(false)) false work for me thanks for reply …