if (isset($_GET['like'])) {
$title = $_GET['title'];
$gid = $_GET['gid'];
$id = $_GET['id'];
if ($_GET['like']==1) {
$update = $db->prepare("UPDATE yorum SET begen = begen + 1 WHERE yorum_id = '$id'");
if ($update) {
Header("Location:../grup-$title-$gid?durum=ok");
} else {
Header("Location:../grup-$title-$gid?durum=no");
}
}else if ($_GET['like']==0) {
$update = $db->prepare("UPDATE yorum SET dislike = dislike - 1 WHERE yorum_id = '$id'");
if ($update) {
Header("Location:../grup-$title-$gid?durum=ok");
} else {
Header("Location:../grup-$title-$gid?durum=no");
}
}
}anlam veremiyorum sql de deniyorum çalışıyor ama php kısmıda update onaylıyor update olmuyor