frank5050
10-18-2012, 11:38 PM
Hi,
I am new to php and working on a bit of code.
I have 2 session variables and I can retrieve the value as below:
$this->session->data['phonemake'];
$this->session->data['phonemodel'];
I need to insert both these variables in the database along with a comments fields which is being inserted fine by itself given below:
This works fine:
$data['comment'] = $this->session->data['comment'];
what I need to do is to also insert the 'phonemake' and 'phonemodel' data along with the above comments data.
I would like to do this:
$data['comment'] = $this->session->data['comment'] + $this->session->data['phonemake'] + $this->session->data['phonemodel'];
The one variable comment by itself is being inserted just fine. What is the correct syntax and way to make phonemake and phonemodel insert along with comments.
Thanks
I am new to php and working on a bit of code.
I have 2 session variables and I can retrieve the value as below:
$this->session->data['phonemake'];
$this->session->data['phonemodel'];
I need to insert both these variables in the database along with a comments fields which is being inserted fine by itself given below:
This works fine:
$data['comment'] = $this->session->data['comment'];
what I need to do is to also insert the 'phonemake' and 'phonemodel' data along with the above comments data.
I would like to do this:
$data['comment'] = $this->session->data['comment'] + $this->session->data['phonemake'] + $this->session->data['phonemodel'];
The one variable comment by itself is being inserted just fine. What is the correct syntax and way to make phonemake and phonemodel insert along with comments.
Thanks