Welcome Guest, Not a member yet? Register   Sign In
How do I pass Array from one view to another using POST?
#4

[eluser]faradayent[/eluser]
Thanks for both replies. I tried cleaning up the HTML but that didn't help. Here's the line of code with the []'s in it:

Code:
echo "<INPUT type=\"hidden\" name=\"search_query\" value=" . $this->input->post('search_query[]') . ">";

PHP rendered it as: <INPUT type="hidden" name="search_query" value=> which didn't work.

I guess what I don't understand is why CI / PHP passes the value so naturally from A to B, and yet I can't seem to "format" it correctly to get it out of B even though it's right there. In A I just use a regular form with a box that the user fills in and the system does it automatically. Even passes quotes through correctly. How does it do it?

How is the POST variable structured? String, or array? I guess I'll have to start looking for the source tomorrow. Or maybe I'll just try serialization...


Messages In This Thread
How do I pass Array from one view to another using POST? - by El Forum - 12-14-2010, 01:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB