i am new to php programming. I always get this error when i run my code
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 service_name = ''' at line 7
this is my code
<?php
session_start();
include('../conn/openconn.php');
if(isset($_POST['butsend'])) {
$servicename = strtoupper($_POST['txtservicename']);
$serviceurl = $_POST['txtserviceurl'];
$id_div = $_POST['select_div'];
$id_unit = $_POST['select_unit'];
$servicedesc = $_POST['txtservicedesc'];
$id = $_SESSION['service_name'];
$updateuser = "UPDATE service SET
service_name = '$servicename',
service_url = '$serviceurl',
id_div = '$id_div',
id_unit = '$id_unit',
service_desc = '$servicedesc',
WHERE service_name = '$id'";
mysql_query($updateuser) or die (mysql_error());
}
?>
i have already search all the previous question but due to my limited knowledge in the programming i cannot find the solution. sorry for my bad english..