Welcome Guest, Not a member yet? Register   Sign In
Problems retreiving session data on View page
#5

Still don't have this resolved. I have spent about 10 hours now on this problem alone. From what I can tell, the problem is more with the session userdata or flashdata then the code itself. The code DOES work using both an associative and numeric array.

Sometimes I make edits and the changes are reflected on the next search (well, I have to refresh the page to see clear the results from the previous search and show the results from THIS search), and sometimes the edits never show up at all. Some times I have to clear all browsing data and then the results will show up again. Sometimes clearing the browser data doesn't work. And sometimes, clearing the browser data seems to cause problems, where the results were displaying fine before and after clearing browser data they are not. I have tried firefox and chrome, along with android phone. I really have no clue what is going on here.

I think if I could figure out the problem with the results not showing up until the page is refreshed, then everything else will work. But this problem needs to be addressed before I can really know how everything else is functioning.


Again, here is the code from the controller that is saving data to userdata and flashdata:

PHP Code:
$this->session->set_flashdata('type'$searchtype);
$this->session->set_userdata($resultsarray);

redirect('/search/results''refresh'); 

And here's the code from the results function in the controller:

PHP Code:
$data['search_type'] = $this->session->flashdata('type');
$this->themes->view('searches/completed'$data); 


So, how can I make it so that whenever a search is made, the results show up on the results page WITHOUT needing to refresh the page, and also so that if the user does refresh the results page, the same results are displayed and not fresh results? Is there a way to control what happens when a page is refreshed regarding flash/userdata?
Reply


Messages In This Thread
RE: Problems retreiving session data on View page - by user2374 - 01-27-2015, 08:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB