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
'like= 1 where ID =57'
at line 1
This is the code with update, all names of attributes and table are checked.
<?php
include("../connect.php");
if (session_id() == "")
session_start();
$id = $_GET['id'];
$update = "Update komentari set like = 1 where ID=$id";
if (mysql_query($update)) {
echo 'success';
}
else {
echo mysql_error();
}
?>