Geting Values From Url And Inserting It On Save()

This is my url:


I want to get the values from url in the _form of respective model(Comments) and when save is insert these values in table along with some values which are filled in the form.

And in actionCreate method of controller, can I return them in $_POST[comments], so that my task becomes easy!!

Have you looked at ?

$type = Yii::app()->request->getParam('type');

public function actionCreate()


     $model=new Company;











Friendly reminder: please don’t encourage people to access superglobal arrays directly.

How to write secure Yii applications

Thanks buddy, it worked!!