Welcome Guest, Not a member yet? Register   Sign In
Multiple sessions problem...
#1

[eluser]Wonder Woman[/eluser]
I have a controller which sets submitted form data into a session, however the first one works but the other three are undefined...any ideas?

Code:
$search_radius = $this->input->post('search_radius');
$property_type = $this->input->post('property_type');
$bedrooms = $this->input->post('bedrooms');
$parking = $this->input->post('parking');

$this->session->set_userdata('search_radius', $search_radius);
$this->session->set_userdata('property_type', $property_type);
$this->session->set_userdata('bedrooms', $bedrooms);
$this->session->set_userdata('parking', $parking);

Is it to do with memory? Or do I need some sort of multiple session library?

Thanks
#2

[eluser]bretticus[/eluser]
[quote author="fpp" date="1281726817"]
Is it to do with memory? Or do I need some sort of multiple session library?[/quote]

Depends on whether you are storing the session data in a cookie. If so, cookies can only hold 4k of data. If you need to store more data in a session, turn on database session functionality and store it in your DBMS.
#3

[eluser]Wonder Woman[/eluser]
Yes this is what I am doing and I have checked the database and they are definitely being stored. Its just weird how the first one "search_radius" is working but the other 3 aren't. Any ideas? It says that they're undefined...
#4

[eluser]Wonder Woman[/eluser]
I've fixed it, thanks anyway.




Theme © iAndrew 2016 - Forum software by © MyBB