$model->save() Problem

Hello i am a new Yii developer.

so now i am trying to insert some data in my mysql database from my form.

i create a Yii project. Then i create a model and create basic form using Crud Generator. It is really too good.

This is my table structure

id int(11) AI PK

full_name varchar(100)

user_name varchar(10)

password varchar(10)

email varchar(100)

alternet_email varchar(100)

designation varchar(100)

company int(3)

obostha int(3)

entry_date timestamp

entry_by varchar(10)

update_date timestamp

update_by int(11)

When i filled up my form in all field and click Create button then first all field insert/update successfully without obostha, entry_date, entry_by, update_date, update_by.

I can’t understand why?

Note(All field are textfield in form).

would you please give me a better solution for that.

You need to flag those attributes as safe or add a validation rules against them. You can do this In your model at the "rules" method.

Thank You very much for your reply. It done.