CodeIgniter Forums
What would cause Flashdata to not be set? - 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: What would cause Flashdata to not be set? (/showthread.php?tid=45163)



What would cause Flashdata to not be set? - El Forum - 09-11-2011

[eluser]bezking[/eluser]
I basically have a really complicated form that I need to do custom validation on. Some pretty complex database queries are used to populate and set up the form so if there are errors found during validation I am redirecting back to the form instead of just loading the view on the processing/validation method in the controller. I want to pass the errors and original data back to the view using flashdata. I have this line right before a redirect():

$this->session->set_flashdata("obl_edit", array("data" => $_POST, "errors" => $errors)) or die("failed");

This prints "failed." If I remove the $_POST, it works fine. Why would trying to include the postdata cause this to fail?