public function actionTccreate() { $model=new TourCategories; // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if(isset($_POST['TourCategories'])) { $model->attributes=$_POST['TourCategories']; if($model->save()) $this->redirect(array('tcadmin')); } $test=array('guide'=>$this->loadContact(Yii::app()->user->cid),'tours'=>$this->loadTours(),'todo'=>$this->loadUnreported()); $this->render('tccreate',array( 'info'=>$test, 'model'=>$model, )); }