<?
include "../../passport.inc.php";
include "../../db/connect.inc.php";
include "function.php";
$sql = "UPDATE plan SET id_plan = '".$id_plan."', name = '".$_POST['name']."', detail = '".$_POST['detail']."' WHERE id_plan = '".$_POST['id_plan']."'";
mysql_query($sql) or die("<pre>$sql</pre>".mysql_error());
echo "<head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></head><body><center><font color=\"blue\">บันทึกข้อมูลเรียบร้อยแล้ว, กรุณารอสักครู่...</font></center></body>";
redirect("plan.php","2");
exit;
?>
ลองตัดแล้วครับ
ขึ้นแบบนี้
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\budget\budget\modules\plan\update.php:3) in C:\AppServ\www\budget\budget\passport.inc.php on line 3
UPDATE plan SET
name = 'หหห',
detail = 'หหหหหหหกฟหก'
WHERE
id_plan = ;
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 '' at line 5