CodeIgniter Forums
From Complete and Notice? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter Archived (from EllisLab) (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: From Complete and Notice? (/thread-10472.html)



From Complete and Notice? - El Forum - 08-01-2008

[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?


From Complete and Notice? - El Forum - 08-01-2008

[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.


From Complete and Notice? - El Forum - 08-01-2008

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