CodeIgniter Forums
From Complete and Notice? - 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: From Complete and Notice? (/showthread.php?tid=10472)



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!