CodeIgniter Forums
Alternative to success messages - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Alternative to success messages (/showthread.php?tid=29416)



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

[eluser]sacarias[/eluser]
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

[eluser]SomeFunkyDude[/eluser]
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

[eluser]sacarias[/eluser]
Oh i was reading about flash data in the documentation. Thank you ill give it a try.