From examples I have seen the only way to submit a form back to the controller/action that rendered it is if you used a model in the view, for example:
but what if I have a custom controller/action and custom form that doesn't have a model? How would I check if it was submitted? In the above example you can simply use
Thanks
public function actionLogin()
{
$model=$this->loadModel($id);
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['User']))
{
$model->attributes=$_POST['User'];
if($model->save())
$this->redirect(array('view','id'=>$model->id));
}
$this->render('login',array(
'model'=>$model,
));
}but what if I have a custom controller/action and custom form that doesn't have a model? How would I check if it was submitted? In the above example you can simply use
if(isset($_POST['User']))but that only works if you are using a model.
Thanks