[eluser]ckeller[/eluser]
In previous apps I've built without the CI framework, i would have a $_SESSION['message']['error'] field that was checked by a show_messages() function above forms etc.
However, when attempting to use this:
$this->session->set_flashdata('message_error', 'That is not a valid login combination');
It does show up until the SUBSEQUENT loading of the page. So someone tries to log in, I process that in the controller, and set the flashdata, then show the view, but the message doesn't show up. If I hit refresh (without reposting), it shows up.
Is this really the right behavior? This doesn't make sense to me. The only way it makes sense to me if if it is expected that you redirect back to the form page so that they cannot re-post the form by hitting refresh. However, then I've learned that the validation_errors() function doesn't display any validation errors once you redirect!
It seem like both are slightly off from how they should work. Any thoughts, ideas, suggestions on how to do this better? Thanks.