whats wrong with this code?

i'm really confused!

when i use INSERT code insted of UPDATE in my file, every thing is ok. but when i use UPDATE,it doesn't



$query = "UPDATE $tblname SET title='$title', desc='$desc',  body='$body', time='$time', faday='$faday', famonth='$famonth', fayear='$fayear', fu_show='$fu_show', fu_day='$fu_day', fu_month='$fu_month', fu_year='$fu_year', wshow='$wshow', dshow='$dshow' WHERE id=$id";


HTML Code:

$query = "INSERT into $tblname values '0', '$title', '$desc', '$body', '$time', '$faday', '$famonth', '$fayear', '$fu_show', '$fu_day', '$fu_month', '$fu_year', '$wshow', '$dshow')" or die(mysql_error());


Check your grant tables to see if you have the update permission.


thanks for your hint
i use EasyPHP

i did it
i checked grant tables
i activated it for All actions, all DBs
but still have problem!

UPDATE `adds` SET `client` = 'client1',`TOTALCOST` = 'totalcost' WHERE `ID` =9710
INSERT INTO `adds` ( `ID` , `client` , `colour`) 
NULL , 'sda', 'ads');

try like that

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.