1

// In my Controller A

class Controller A extends Controller
{

    public function action save()
    {
       $array1 = $_POST['array'];
           $A = $this->redirect(array('controller B/insert','data'=>$array1));
           echo $a;
    }
}

// controller B

class Controller B extends Controller
{
    public function action Insert($data)
    {
        echo $data;
        /*----code-----*/
        return value;
    }


}

I am newbie in yii framework. I have problem with, call controller b action Insert() from controller a with parameters but i have error:

"400 Your request is invalid."

I don't know how to fix it. please help me anyone..! Sorry for my English.. Thank You..

Davin Tryon
  • 66,517
  • 15
  • 143
  • 132
Vijaykumar
  • 11
  • 1

1 Answers1

0

You should call the controllerB like this

www.example.com/controller/action/data/somedata

You might have missed the data so its difficult for the system to find the action