Passing parameters submitButton to controller

In view writing:


<?= CHtml::submitButton('Обновить', array('chat/index','id' => "Refresh")); ?>

In controller:




        if (isset($_POST['Refresh']))

        {

           $this->redirect('?r=chat/index'); 

        }

Why is not working?

maybe this can help you !

http://www.yiiframework.com/doc/api/1.1/CController/#redirect-detail

It’s not a redirect. It does not work “if”

here you go


if (isset($_POST['id']) && $_POST['id'] === 'Refresh')

{

   $this->redirect('?r=chat/index'); 

}