<td><center><input type="text" name="xxxx[]" id="xxxx"
value="<?php
if ($resultpo['AAAA']==NULL)
{
echo NULL;
}
else
{
echo date_format($resultpo['xxxx'],'d-m-Y');
}
?>"class="form-control" placeholder="01-02-2018"></td>
$xxxx=array();
$i=0;
foreach($_POST["xxxx"] as $var)
{
if($var=='')
{
$xxxx[$i]='';
}
else
{
$year=substr($var,6,4);
$month=substr($var,3,2);
$date=substr($var,0,2);
$xxxx[$i]=$year."-".$month."-".$date;
}
$i++;
}
if(strtotime($B)< strtotime($xxxx[$j])) เหมือนไม่มา
for($j=0;$j<$i;$j++)
{
/*if($vendorcdate[$j]==$B)*/
if(strtotime($B)< strtotime($vendorcdate[$j]))
{
echo "<script>alert('Please input Date !');</script>"; return 0;
}
else if($openqty[$j]+1<=$vendorcqty[$j])
{
echo "<script>alert('You input over qty Please enter again!');</script>"; return 0;
}
$update="updateqty SET
aaa ='".$quotation[$j]."'
,VCONFDATE='".$xxxx[$j]."'
$update.="where qty= ".$qty[$j]."";
$queryupdate=sqlsrv_query($conn,$update);
}