Welcome Guest, Not a member yet? Register   Sign In
Custom Session Variables not saved during session
#1

[eluser]Juan Velandia[/eluser]
Hello Everyone

I ve created a model to obtain some session data:
Code:
function get_idusers()
{      
                      $this->db->select('*');
                      $this->db->distinct();
  $this->db->where('idbuyer', $this->session->userdata('idbuyer'));
  $this->db->where('idseller', $this->session->userdata('idseller'));
  $query1 = $this->db->get('view_campaign_data');

                foreach ($query1->result() as $row)
                         {

                       $this->session->set_userdata('campaign_name', $row->campaign_name);
                       $this->session->set_userdata('idcampaign', $row->idcampaign);
                       $this->session->set_userdata('unit_name', $row->unit_name);
                       $this->session->set_userdata('description', $row->description);


                          }
  return $query1->result();

        }

But when i try to use the custom session data, it seems that it doesnt exist. Do you have any advice? thanks!
#2

[eluser]Juan Velandia[/eluser]
Well, it seems that I'm going to save session data in a database. I Dont know if this issue has to do with the server, the browser or CI. But I need to move forward




Theme © iAndrew 2016 - Forum software by © MyBB