<?php
include "connect.php";
$tfbnum = $_POST['txt1'];
$tfbname = $_POST ['txt2'];
$tfbaddress = $_POST ['txt3'];
$tfbtel = $_POST ['txt4'];
$link = mysqli_connect("localhost", "root","","dbtfb");
$sql="INSERT INTO `tfbdb`(`tfbnum`, `tfbname`, `tfbaddress`, `tfbtel`) VALUES ([$tfbnum],[$tfbname],[$tfbaddress],[$tfbtel])";
echo $sql;
$result=mysqli_query($link,$sql);
if ($result){
echo "save success";
echo "[<A href=tfbaddbranch2.html>Click Back</a>]";
}else{
echo "don't successsssssss";
}
?>
หลังจากที่ ลอง Echo $sql ออกมาแล้วได้ แบบนี้ครับ
INSERT INTO `tfbdb`(`tfbnum`, `tfbname`, `tfbaddress`, `tfbtel`) VALUES ([2],[2],[2],[2])don't successsssssss
รบกวนช่วยดูให้ด้วยครับ ผมผิดพลาดตรงไหน ขอบคุณล่วงหน้าครับ