CodeIgniter Forums

Full Version: From Complete and Notice?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]ywftdg[/eluser]
I have an area where the user uploads files and when its done, it redirects back to the same page. I used a redirect, because I could not get the validation->set_fields to reset otherwise. Is there a way to say, if this is uploaded and db insert is done, clear the form fields that have validation->set_fields on them without using a page redirect.

I ask because right now, using the redirect, I cannot figure a way to have a div layer show with the message of "upload complete", I can only get this to work not using a redirect. The redirect though does clear my form fields back to blank.

I am sure someone out there has done this numerous times already, any pointers?

El Forum

[eluser]srobet[/eluser]
You can use $this->session->set_flashdata('message','Upload Complete'); before you redirect it.

and echo $this->session->flashdata('message'); to view it.

El Forum

[eluser]ywftdg[/eluser]
God, I love this community, so dang fast and helpful! Thanks so much, works like a charm!