Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/07/2012, 09:03
Avatar de injhomosa
injhomosa
 
Fecha de Ingreso: febrero-2012
Mensajes: 26
Antigüedad: 12 años, 2 meses
Puntos: 1
Yii framework

Hola a todos

Mi problema es que necesito en yii framework registrar la fehca en que se envio un formulario, y el codigo que tengo para eso es el siguiente:

public function actionCreate()
{
$model=new form;

// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);

if(isset($_POST['form']))
{
$model->setAttributes($_POST['form'], 'Cfecha'=date('yyy-mm-dd'));
if($model->save())
$this->redirect(array('view','id'=>$model->idContac));
}

$this->render('create',array(
'model'=>$model,
));
}

______________________
pero me aparece un error en esta linea:
$model->setAttributes($_POST['form'], 'Cfecha'=date('yyy-mm-dd'));

mas concretamente en el =