I need help regarding array insertion into mysql table.
I have an array when I add and item to the shopping cart
$_session['cart_array'] = array("item_id" => $pid, "quantity"=>1)
now if I have one item in cart when I do print_r($_session['cart_array']) array looks like
Array( [0] => Array ( [item_id] => 1 [quantity] => 1 ) )
now I need to insert this array data to a table named purchased_products having columns
id, product_name, product_quantity
Then try to insert that variable in your database:
Use NULL if your id is auto increment.
Hope it could help you..