Подскажите пожалуйста как мне передать содержимое в tid2 массиву $size
index.php
<label>
<select>
<option tid2="40"></option>
</select>
</label>
<button tid="'.$row1["products_id"].'">
<img src="img/cart.png" >
<span class="s">Add to cart</span>
</button>
script.js
$('.add-cart-style').click(function(){
var tid = $(this).attr("tid");
$.ajax({
type: "POST",
url: "/include/addtocart.php",
data: "id="+tid,
dataType: "html",
cache: false,
success: function(data) {
loadcart();
}
});
});
Обработчик "/include/addtocart.php"
$id = clear_string($_POST["id"]);
$size = clear_string($_POST["size"]);
|