Reputation: 185
I'm using PHP with MVC pattern and the Slim 3 microframework for routing.
I need to show an error message to the user in the twig view. This error is regarding the username or password that they submitted being invalid.
The flow is like this:
At this point I need to give user the feedback that their input was invalid. I can think of a few options, but I'm not sure if any of them are "optimal" or best practice.
What would be the best practice method of handling this situation?
Upvotes: 0
Views: 278
Reputation: 2424
A better solution would be to use the "Flash messages"
Documentation here: https://www.slimframework.com/docs/v3/features/flash.html
Upvotes: 0