I am having a problem converting a set of dates in an array. It keeps zeroing out the other values and gives me a date of 1961-12-31. Here is what i have as the script can anyone tell me what is going on and how to resolve this?
for($i=1;$i<$POST['total']+2;$i++)
{
$insert_array[] = "('" . $date1[$i] . "','" . $qty[$i] . "','" . $gift[$i] . "','" . $fmv[$i] . "','" . $member[$i] . "','" . $npv[$i] . "','" . $ncpg[$i] . "','" . $notes[$i] . "')";
$date1_total = $date1[$i];
$qty_total = $qty[$i];
$gift_total = $gift[$i];
$fmv_total = $fmv[$i];
$member_total = $member[$i];
$npg_total = $npg[$i];
$ncpg_total = $ncpg[$i];
$notes_total = $notes[$i];
}
$d = strtolower(date(F));
$gifts = "gifts";
$res_date = date('Y-m-d'), strtotime($date1_total);
$insert_array[] = "('" . $res_date. "','" . $qty_total . "','" . $gift_total . "','" . $fmv_total . "','" . $member_total . "','" . $npg_total . "','" . $ncpg_total . "','" . $notes_total . "')";
mysql_select_db($database_vp, $vp) or die(mysql_error());
$sql = "INSERT INTO $d$gifts (gift_order_date,gift_order_total,gift_id,gift_order_fmv,member_profile_id,gift_order_npv,gift_order_ncpg,gift_notes) VALUES " . implode(",",$insert_array);
mysql_query($sql, $vp) or die("could not execute INSERT query");