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

[eluser]faradayent[/eluser]
It's kind of funny how the things you think will be hard (like getting the Zend search function going) turn out to be easy, and something easy like passing a variable turn out to be a nightmare. :-S

I think I'll stay away from any complicated use of POST in the future. Didn't even work with serialization.

I finally decided to serialize the search string then put it in a CI session variable. Seems to work.

To put it in:
Code:
$data_search = array(
        'search_string' => serialize($this->input->post('search_query') )
    );
$this->session->set_userdata($data_search);

To retrieve it:
Code:
<?php
echo unserialize( $this->session->userdata('search_string'));
?>

Codeigniter is Great, but PHP is a bit too magical for me :lol:


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



Theme © iAndrew 2016 - Forum software by © MyBB