Why is this not working. In step one when I click on button that has the name="stepOne" it recognizes it and does this step
else if(isset($_POST['stepOne']))
But when I click on button name="stepTwo" it just goes to
else
part and renders "createstepone".
Data is being properly sent through steps, but it won’t record that last “stepTwo”
public function actionCreate()
{
$this->pageTitle='Dodaj novu vijest';
$model=new Vijesti;
if(isset($_POST['stepTwo']))
{
$model->attributes=$_POST['Vijesti'];
$model->datum=time();
if($model->save())
$this->redirect(array('view','id'=>$model->ID));
}
else if(isset($_POST['stepOne']))
{
$model->attributes=$_POST['Vijesti'];
$domDocument=$this->domDocument($model->link);
$this->render('createsteptwo',array(
'model'=>$model,
'domDocument'=>$domDocument,
));
}
else
{
$this->render('createstepone',array(
'model'=>$model,
));
}
}