我有这个代码(这是工作并将这些变量传递给另一个文件)
var month = "<?php echo openedMonthbid();?>";
var user = "<?php echo $_SESSION['member_id'];?>";
var day = new Array();
$(':checkbox:checked').each(function(i){
day.push('`' + $(this).val() + '`'); });
var count = day.length;
$.ajax({
type: "POST",
url: "sendBidding.php",
data : "user="+user+"&days="+day+"&month="+month+"&number=",
dataType: "json",
sendBidding.php
$month = $_POST['month'];
$user = $_POST['user'];
$days = $_POST['days'];
$count = $_POST['count'];//if a check 3 values I get '3'
mysql_query("INSERT INTO $month ($days) VALUES ('1','1','1')");
$result = true;
echo json_encode(array("success"=>$result,
"datas" => $data,
"mon"=>$month));
我想添加与所选天数一样多的值('1')。如何更改 VALUES ('1','1','1') ?