[eluser]Tom Taila[/eluser]
Hey guys, Im having a lil trouble storing part of a form which is a radio button, everything else is storing into the database just fine, but this isnt for some reason, below is the html and codeigniter code for the button/storage funtion:
Code:
<span id="radio">Bottle size: <br/></span>
<span id="radio2">1 bottle / $49.95: </span>
<input class="validate[required] radio" type="radio" name="data[User][preferedColor]" id="radio2" value="1" name="tick1"/>
<br/>
<span id="radio3">3 bottle / $99.90: </span>
<input class="validate[required] radio" type="radio" name="data[User][preferedColor]" id="radio2" value="3" name="tick2"/>
and heres the ci part:
Code:
function save_info()
{
$customer_info = array(
'full_name' => $this->input->post('full_name'),
'address' => $this->input->post('address'),
'title' => $this->input->post('title'),
'city' => $this->input->post('city'),
'zip_code' => $this->input->post('zip_code'),
'quantity' => $this->input->post('tick1'),
'quantity' => $this->input->post('tick2')
);
$data = $this->db->insert('customer_info', $customer_info);
}
the database is set up saying that the field in the table it will store in is called 'quantity' and its type is tiny int,
any help would much appreciated, thanks so much!