Welcome Guest, Not a member yet? Register   Sign In
insert query stalling when trying to pass data stored in session
#1

[eluser]Brad K Morse[/eluser]
I store a piece of data in session, then when I make an insert into the database, I pass that in, like this.

Code:
$data = array(
'age' => $this->session->userdata('age'),
'weight' => $this->input->post('weight')
);

$this->db->insert('table', $data);

It will stall with me passing the age stored in the session.

If I remove that and just past in a number, like below, it works without a problem

Code:
$data = array(
'age' => 20,
'weight' => $this->input->post('weight')
);

$this->db->insert('table', $data);

I echo'd out $this->session->userdata('age') and it displays the appropriate age.

I also tried inserting the value into a hidden input and inserting it into the table w/o directly calling it from session and it still stalls.

Any help is appreciated.


Messages In This Thread
insert query stalling when trying to pass data stored in session - by El Forum - 06-04-2012, 12:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB