<?
require("connect.php");
$getline = preg_split("/[\s\n]+/",$manyrecord);
if ($connect and $manyrecord) {
for ($j=0;$j<count($getline)-1;$j++) {
$l = $j + 1;
$rec = preg_split("/[\s,]+/",$getline[$j]);
print "$l $rec[0] - $rec[1] - $rec[2] - $rec[3]";
$sql = "insert into entstd values('$rec[0]','$rec[1]','$rec[2]','$rec[3]')";
$chk="ผิดพลาด";
if ($rec[0] > 1) {
$result = mysql_db_query($db,$sql);
if ($result) { $chk="เพิ่มเรียบร้อย"; }
}
echo "$chk<br>";
}
mysql_close($connect);
} else {
echo "Connect error";
}
?>
จำนวน : 21 บรรทัด