Alex Rivera | Logout

CodeIgniter Flash Data

Asked 2012-09-10T14:04:29.950
19

I'm struggling with Flash Data in CodeIgniter.

I basically want to:

add a category to a database redirect user back to a page show a success pop-up message "Your category has been created"

So far I can add the category successfully to the db and the user input is validated correctly, only thing is I don't know how to create the pop up success message. (I don't want to load a success view), just redirect back to where they came from and show small message in the top corner or something.

Is flash data the right way to go?

Edit
Report

1 Answer

0

Yes, just check if the flash data is available, if it is, show the message, if it isn't, then don't show it. as simple as that.

p.s. you should always do a redirect after a POST request.

answered 2012-09-10T14:10:57.097

Your Answer