Ive problem to update after doing editing....May someone can help me to check this codes or give me another sample of updates code.Thank you.
<?
include 'dbase.php';
$namaproduk=$_POST['namaproduk'];
$hargaseunit=$_POST['hargaseunit'];
$peratuskeuntungan=$_POST['peratuskeuntungan'];
$hargajualan=$_POST['hargajualan'];
$profit=$_POST['profit'];
$bilstok=$_POST['bilstok'];
$tarikh=$_POST['tarikh'];
$id=$_POST['id'];
$query = "UPDATE stok SET namaProduk='$namaproduk', hargaSeunit='$hargaseunit', peratusKeuntungan='$peratuskeuntungan', hargaJualan='$hargajualan', profit='$profit', bilStok='$bilstok' , NOW(), where id='$id'";
$result=mysql_db_query($dbname,$query);
if($result){
header("Location:rekodstok.php");
}
?>