error is:
Notice: Undefined index: rose_ID in C:\xampp\htdocs\GOU Database Testing\staff\edit.php on line 12 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 'WHERE rose_ID = '0'' at line 2
ty in advance
its ment to edit data in database
<?php
require_once('dbconn.php');
?>
<?php
$submit = $_POST['submit'];
if ($submit == 'Update') {
$sql = sprintf("UPDATE roses SET rose_image = '%s', rose_name = '%s',
decription = '%s', fragrant = '%s', type = '%d', price = '%d', WHERE rose_ID = '%d'",
$_POST['rose_image'], $_POST['rose_name'], $_POST['decription'], $_POST['fragrant'], $_POST['type'], $_POST['price'], $_POST['rose_ID'] );
mysql_query($sql) or die(mysql_error());
}