Reputation:
i Post values from single and get from table it is working fine. if post from two table and get from two table is not showing second table data. i called var_dump($aaa). but it showing string "",
i show here my controller code here. please suggest how cloud be change :
i did like this. output showing like string(0) ""
$model=new Recipe; $model1= new Ingredienttype;
if(isset($_POST['Recipe']))
{
$model->attributes=$_POST['Recipe'];
$recipe_name=$model->name;
$course=$model->course_id;
$cuisine=$model->cuisinename;
$type=$model->type;
$calorie=$model->calorie_count;
if(isset($_POST['Ingredienttype']))
$model1->attributes=$_POST['Ingredienttype'];
$ingredient=$model1->ingredient_type;
var_dump($ingredient);
{
$this->redirect(array('advancesearch1','name'=>$recipe_name,
'course'=>$course,'cuisine'=>$cuisine,'ingredient'=>$ingredient,
'type'=>$type,'calorie'=>$calorie
));
}
}
$this->render('newadv',array('model'=>$model,'model1'=>$model1));
}
public function actionAdvancesearch1()
{
$model=new Recipe;
$name=$_GET['name'];
$course1=$_GET['course'];
$cuisine1=$_GET['cuisine'];
$type1=$_GET['type'];
$calorie1=$_GET['calorie'];
$ingredient1=$_GET['ingredient'];
var_dump($ingredient1);
Upvotes: 0
Views: 54
Reputation: 8072
Check next:
Upvotes: 1