Skip to content

Commit

Permalink
redirect to list page after saving joke
Browse files Browse the repository at this point in the history
  • Loading branch information
TRPB committed Mar 10, 2019
1 parent 5980d8e commit 2e8d7f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion JokeForm/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ public function output(\JokeSite\JokeForm $model): string {
$errors = $model->getErrors();

if ($model->isSubmitted() && empty($errors)) {
header('location: index.php?route=success');
//On success, redirect to list page
header('location: index.php');
die;
}

Expand Down

0 comments on commit 2e8d7f5

Please sign in to comment.