|
function add_cart() {
$id = $this->input->post ( 'id' );//产品id
$qty = $this->input->post ( 'qty' );//数量
$price = $this->input->post ( 'price' );//价格
$name = $this->input->post ( 'name' );//产品名字
$size = $this->input->post('size');
$data = array (
'id' => $id,
'qty' => $qty,
'price' => $price,
'name' => $name,
'optiions' => array('size' => $price)
);
$this->cart->insert($data);
redirect ( 'search/flow' );
}
为什么数据库是空的 |
|