当我需要更新时,我会收到这个答案。我该做什么?
public function actionUpdate($id)
{
if(isset($_POST['submit']))
{
$recruit = Recruit::model()->findByPk($_POST['pid']);
$recruit->title = $_POST['title'];
$test->save();
$this->redirect(array('admin','id'=>$id));
}
$this->render('update',array(
'model'=>$this->loadModel($_POST['pid']),
'id'=>$id,
'pid'=>$_POST['pid'],
));
}