i have some checkboxes which created by For loop like this:
for ($i=1; $i <= $loan['loanreqmonth']; $i++)
{
echo '<input name="loan['.$i.']" type="checkbox" value="'.$i.'">loan # '.$i.'</div>';
}
and i process and import the selected checkboxes whith something like this:
foreach($_POST['loan'] as $loan)
{
mysql_query("INSERT INTO `loanpays`(`loanid`,`type`,`num`,`codemelli`, `price`, `month`, `year`,`stamp`) VALUES ('$loan[ID]','loan','$loan','$_SESSION[codemelli]','$priceloan','$month','$year','$stamp')");
}
i want to put month (1-12) and year(2017-2020) from current month and year for each selected checkbox. for example the first checkbox month is (11) and year is(2017) the next one is 12 / 2017 but the problem is the next one is 1 / 2018!
how can I solve this problem?