the road is dead!
assume that I am now in the store
I would like to save my current property information
and then press the button to use it. Give it to mysql
but I have a problem
how can I propose to save it?
I now have two must
<input type="hidden" name="cart_prod_id[]" value="<?=$row["prod_id"];?>">
<input type="hidden" name="cart_quantity[]" value="<?=$row["quan"];?>">
one is the quantity, the other is the commodity ID
but how can I receive it at the other end?
this is where my receiver writes
$_SESSION["cart_prod_id"] = $cart_prod_id;
print_r($_SESSION["cart_prod_id"]);
he is printing out
Array ( [0] => 11 [1] => 5 )
but it doesn"t seem to be what I want?
I may need to know which product ID, quantity, and unit
should be saved in what format? Json? How to implement
?
the other one I wrote doesn"t seem to be what I want?
$_SESSION["cart"] = array("prod-id" => $cart_prod_id , "quan" => $cart_quantity);
echo json_encode($_SESSION["cart"]);
// {"prod-id":["11","5"],"quan":["3","3"]}
what kind of child do you usually have to grow up to be?