D
D
Doniyor Mamatkulov2016-06-28 10:37:40
Yii
Doniyor Mamatkulov, 2016-06-28 10:37:40

Why doesn't submit work?

The form:

<?php
$form = ActiveForm::begin();
?>
<?= Html::submitButton(Yii::t('app', 'Remove'), ['class' => 'btn btn-primary']) ?>
<?php ActiveForm::end() ?>

Controller:
$md = new MdbUsers();
if($md->load(\Yii::$app->request->post())) {
$this->redirect('/');
}

Actually, why doesn't the redirect work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2016-06-28
@bitver

return $this->redirect('/');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question