ตอนแรกมันไม่ขึ้น error ครับ
แต่พอลองใส่ตามคุณ aunjijoke มันขึ้น error ว่า
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''dfs)' at line 1 มันคืออะไรครับ
<?
$host="localhost";
$username="";
$password="";
$db="mydatabase";
$tb="lesson";
mysql_connect( $host,$username,$password) or die ("ติดต่อกับฐานข้อมูล Mysql ไม่ได้ ");
mysql_select_db($db) or die("เลือกฐานข้อมูลไม่ได้");
mysql_db_query($db,"INSERT INTO lesson4 (id ,title_less, message_less ) VALUES ( '$id' , '$title_less' , '$message_less')") or die (mysql_error());
$db_query=mysql_db_query($db,$sql);
<?
$host="localhost";
$username="";
$password="";
$db="ชื่อดาต้าเบส";
$tb="ชื่อตาราง";
mysql_connect( $host,$username,$password) or die ("ติดต่อกับฐานข้อมูล Mysql ไม่ได้ ");
mysql_select_db($db) or die("เลือกฐานข้อมูลไม่ได้");
mysql_db_query($db,"INSERT INTO $tb (id ,title_less, message_less ) VALUES ( '$id' , '$title_less' , '$message_less')") or die (mysql_error());
$db_query=mysql_db_query($db,$sql);