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

(This post was last modified: 01-28-2015, 01:00 PM by user2374.)

Thanks for the help. I finally got it working, not exactly like you had it though. For some reason I was never able to load my associative array from the controller into a numeric array in the views page. However, once I added the array data into flashdata (i have the array set to both userdata and flashdata) I was able to call specific elements within my views page like this:

PHP Code:
<td class="txtcenter"><?= $this->session->userdata['8']; ?></td> 

And in the for loop for the dynamically generated rows, I just referenced them as if they where numeric (using index) and it worked. So basically I was able to pull data from the array using both ['1'] for a specific element and [$j] for an indexed element. I don't know how it works but it does.

Does echo not work when using it withing html tags? I keep reading about using echo but it never works within div tags, where I need to put the array elements.

Everything is working great except for refreshing the page. I want to make it so that whatever results were generated during the search are the exact same results displayed when the page is refreshed. Right now it just generates new results upon page refresh. How can I accomplish this?
Reply


Messages In This Thread
RE: Problems retreiving session data on View page - by user2374 - 01-28-2015, 12:58 PM



Theme © iAndrew 2016 - Forum software by © MyBB