i dont know where i went wrong. I thought i've already use the right syntax. but still there's error on my queries
"INSERT INTO tempahan(id,nama,tarikh,mula,akhir,unit,bil,sebab) VALUES ('$id','$nama','$tarikh','$mula','$akhir','$unit','$bil,'$sebab')
ON DUPLICATE KEY
UPDATE
tarikh ='$tarikh'
,mula='$mula'
,akhir='$akhir'
,unit='$unit'
,bil='$bil'
,sebab='$sebab'
";
and it will show 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 '','') ON DUPLICATE KEY UPDATE tarikh='' , mula' at line 1