Welcome Guest, Not a member yet? Register   Sign In
assoc_to_uri() with nested array
#1

[eluser]rajend3[/eluser]
I have the following:

Code:
$messages[] = "invalid variable";
$messages[] = "invalid value";

$params["status"] = $status;
$params["messages"] = $messages;

redirect("http://localhost/index.php/math_controller/calc/" . $this->uri->assoc_to_uri($params));

The problem is the redirect looks like the following (no meesages):

Quote:http://localhost/index.php/math_controll...ges/Array/

Is there a better way around this?

Thanks
#2

[eluser]Aken[/eluser]
What are you trying to do?
#3

[eluser]rajend3[/eluser]
I'm just trying to pass the status and messages to the calc method. The calc method just checks if the user is signed in and some other stuff before passing the status and messages to a view.
#4

[eluser]Aken[/eluser]
I'd recommend using flash data to pass messages over redirects. http://ellislab.com/codeigniter/user-gui...sions.html
#5

[eluser]rajend3[/eluser]
Thanks Aken for the quick response, I`ll go the route of using flash data.




Theme © iAndrew 2016 - Forum software by © MyBB