Dizzy221
(Ksn850)
1
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?
Garfield
(Guillaumeasfar)
2
Dizzy221
(Ksn850)
3
It’s not a redirect. It does not work “if”
alirz23
(Alirz23)
4
here you go
if (isset($_POST['id']) && $_POST['id'] === 'Refresh')
{
$this->redirect('?r=chat/index');
}