Welcome Guest, Not a member yet? Register   Sign In
Multidimensional Flashdata arrays?
#1

[eluser]sacarias[/eluser]
Do multidimensional arrays work with the flash data functions?

I have this code that works in normal php applications. i dont like to redirect to a success page so when there is an error on a form i like to use this to collect each error and display it to them right above the form.

Everytime you catch an error you use this

EX.
Code:
if(empty($username)){
$this->simpleMessages->addMessage("login-form", "error", "You must specify a username.");
}

Code:
function addMessage($location, $type, $description){
        return $this->messages[] = array("location" => $location, "type" => $type, "description" => $description));
    }

In order for the messages to be saved, they need to be saved in flashdata....which was the easiest fix, but now its turning out to be difficult.

thanks for your time.


Messages In This Thread
Multidimensional Flashdata arrays? - by El Forum - 04-09-2010, 04:52 PM
Multidimensional Flashdata arrays? - by El Forum - 04-09-2010, 05:24 PM
Multidimensional Flashdata arrays? - by El Forum - 04-09-2010, 05:37 PM
Multidimensional Flashdata arrays? - by El Forum - 04-09-2010, 05:47 PM
Multidimensional Flashdata arrays? - by El Forum - 04-09-2010, 05:54 PM
Multidimensional Flashdata arrays? - by El Forum - 04-09-2010, 10:31 PM
Multidimensional Flashdata arrays? - by El Forum - 04-10-2010, 09:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB