So I have this CART table which stores the selected items of the customer and ORDER table which stores the ordered items of the customer, obviously, I would like to transfer/add the selected item of the customer to the ORDER table. I want to do it like INSERT INTO
(array of product_names,size,price,etc..) into the ORDER table because customers can have multiple items in the cart. I really need your help :|
$query=mysql_query("select * from cart where user_id =$session_id");
while($row=mysql_fetch_assoc($query)){
$cartItems = array('user_id'=$row[user_id],'product_name'=>$row['product_name'], 'price'=>$row['price'], 'size'=>$row['size']);
}