if (!empty($_POST['like'])) {
$sql = "UPDATE Post set lcount = lcount + '1'";
$result=mysql_query($sql);
if (!$result) {
printf("Error: %s
", mysqli_error($con));
exit();
}
echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>";
echo "<input type = 'submit' value = 'like' name='like'/>";
echo "</form>";
Trying to add like button like FB but my query is throwing an error. Lost please help. It is not displaying any detail error. Just writes error on my page...But I think its the query... Is my query right?