แก้จนข้อมูลไม่ขึ้น error แต่ไม่ได้หมายความว่าโค้ดจะทำงานถูกต้องนะครับ สรุปว่าผิดตรงไหน แก้ไขอย่างไร
ถ้าจะให้ดี ลงโค้ดทั้งการ ส่ง และ รับ ข้อมูลมาให้ทดสอบดูครับรับลองไม่มีปัญหากวนใจ
insert.php ตัวส่งครับ<title>Insert Data in contact_Us</title>
<p>Insert Comment</P>
<?php
require('config.inc.php');
$today=date("Y-m-d H:i:s");
$sql="insert into tb_contact
(fullname,email,detail,posted,ip_address) values
('$fullname','$email','$detail','$today','$REMOTE_ADDR')";
$result=mysql_query($sql, $link);
mysql_close($link);
echo "Insert into Contact_Us Database
Complete!<br>\n";
echo "Go back <a href=\"/\">Home</a><br>\n";
?>
list.php showข้อมูลที่กรอกไป<?php
require('config.inc.php');
require('th_func.php');
$sql="select fullname,email,detail,posted from tb_contact where enable='1' order by posted";
$result=mysql_query($sql,$link);
print "<title>List all record in tb_contact</title>\n";
print "<body bgcolor=\"#FFFFFF\">\n";
print "<div align=\"center\">\n";
print "<table width=\"600\" border=\"0\">\n";
print "<tr>\n";
print "<td bgcolor=\"#CCCCCC\">\n";
print "<div align=\"center\">\n";
print "<font face=\"CordiaUPC\" size=\"4\">";
print "All information</font>";
print "</div>\n";
print "</td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td>\n";
print "<hr size=\"1\">\n";
print "</td>\n";
print "</tr>\n";
while ($object=mysql_fetch_object ($result)){
print "<tr bgcolor=\"#FFCCFF\">\n";
print "<td><font face=\"MS Sans Serif\" size=\"1\">\n";
print "โดย <a href=\"mailto:$object-
>email\">$object->fullname</a> ";
print "เมื่อวันที่ ". thaidate($object->posted) . "
น.</font></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td bgcolor=\"#FFFFCC\">\n";
print "<font face=\"MS Sans Serif\" size=\"1\">
$object->detail</font>";
print "</td>\n";
print "</tr>\n";
print "<tr valign=\"top\">\n";
print "<td>\n";
print "<hr size=\"1\">\n";
print "</td>\n";
print "</tr>\n";
}
print "<tr>\n";
print "<td bgcolor=\"#CCCCFF\">";
print "<font size=\"2\" face=\"Times New Roman\">End of
tb_contact</font>";
print "</td>\n";
print "</tr>\n";
print "</table>\n";
print "<br>\n";
print "</div><br>\n";
print "</table>\n";
mysql_close($link);
?>