How can I pass variables from JavaScript to PHP?

后端 未结 2 963
庸人自扰
庸人自扰 2020-11-29 13:51

I am using jQuery to calculate prices. Here is a small snippet of my JavaScript:

// Prices: radio
var curLam = \"gloss\";
$(\"input[name=lamination]\").click         


        
2条回答
  •  孤城傲影
    2020-11-29 14:30

    You could put the ID of the product into an input element and then when you submit into the shopping cart, then the value should be in your php $_POST variables.

    There you can check the price and other information straight from your database.

提交回复
热议问题