lookout adlı üyeden alıntı: mesajı görüntüle
update.php

require 'mysql.php';
if (isset($_POST['process'])) {
  $process = $_POST['process'];
  if ($process = 'update') {
    $id = 1;
    $sorgu = $db->prepare("UPDATE tablom SET hit = hit +1 WHERE id='".$id ."' ");
    $sorgu->execute(array($id));
  }
  if ($process = 'delete') {
    //other processes
  }
  if ($process = 'add') {
    //other processes
  }
}
index.php

<button type="button" id="up" >Update</button>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0w wj1yYfoRSJoZ+n" crossorigin="anonymous"></script>

<script>
$(document).ready(function(){
  $("#test").click(function(){
    var process = "update";
    $.ajax({
        type:"POST",
        url:"update.php",
        data:{process: process},
        success: function(data){
        }
    });
  });
</script>
Merhaba. Yaptıklarının aynısını koplayaıp yapıştırdım fakat hiçibir tepki alamıyor, console da https://prnt.sc/6P2L8l0XzvrG hatalarını alıyorum.
Xampp Kullanıyorum. Xampp ımda bir sıkıntıdan kaynaklı olabilir mi?