Here goes my second dumb question of the week…
I am trying to pass variables between actions using redirect:
From:
public function actionCreate()
{
$model = new Profile();
$model->scenario = 'create';
if ($model->load(Yii::$app->request->post()) && $model->createProfile()) {
return $this->redirect('form1', ['id' => $model->id,]);
} else {
return $this->render('create', ['model' => $model,]);
}
}
To:
public function actionForm1()
{
$id = <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />;
$model = profile::findOne($id);
I have checked every resource I have available and cannot figure how to capture the variable. I know the answer is simple.