CodeIgniter Forums
Alternative to success messages - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Alternative to success messages (/showthread.php?tid=29416)

Alternative to success messages - El Forum - 04-09-2010

Hello all,
i was wondering if there is an alternative to the success message page that codeigniter pushes using.
ex. Success Page in Form Validation

I dread redirecting to another page to tell errors/success. i would rather stay on the original page and output the success message.

another example...
at the singup of my website, i require an email, and the email must be verified.

so after signup form is submitted it will not redirect but rather display a success message telling the user to check the email. i know this is possible in other code, but not sure in CI.
Thanks for swift responses.

Alternative to success messages - El Forum - 04-09-2010

Check out the Sessions Class, there's methods for "Flashdata". You can do an if/else in the controller, if the account was created, set the flashdata to store a success message, then you can somehow work this into the layout.

Alternative to success messages - El Forum - 04-09-2010

Oh i was reading about flash data in the documentation. Thank you ill give it a try.