Hi shinobi,
OK, nearly there ...
1) I think it's probably that you don't 'quote' numeric entries in SQL, so the id value in the WHERE clause should not be quoted ...
$sql = "
INSERT INTO ".$table_name." (pengurus, tarikhterima, status)
VALUES ('".$pengurus."', '".$tarikh."', '".$status."')
WHERE id =".$_POST['id']."
";
... which, for your particular example would produce ...
UPDATE mohon SET pengurus = 'sdfd', status = 'LULUS', tarikhterima = '2004-11-2' where id = 6
2) I notice that the date value you are attempting to INSERT may not be valid. The standard pattern is YYYY-MM-DD, so you'll need to fix the date before attempting to insert it.
In general, you should be error-checking ALL values to be inserted into a database. Never rely on the user (even if it's you) to put the data into the correct format. There is a 'law' of programming:
If there is a correct way of doing things and an incorrect way, the user will ALWAYS do the incorrect one!!!!
Paul 🙂