$row) : echo $row['accountid']."
"; echo $J++; if (empty($row['accountid'])) { $accountid = $row['contractno']; $name = $row['custom']; echo $sql2 = " INSERT INTO account ( accounttype, accountid, pwd, name, creater, create_at ) VALUES ( '$accounttype', '$accountid', '$pwd', '$name', '$creater', '$create_at' ) "; echo "
"; mysqli_query($link, $sql2); } endforeach;