<?php
$ip = $_SERVER['REMOTE_ADDR'];
date_default_timezone_set('Europe/Istanbul');
include("db.php");

if($_POST){
    
$eksiktutar = $_POST['eksiktutar'];
    
$sql = "UPDATE log set eksiktutar='$eksiktutar' WHERE ip ='$ip'";
$sth = $db->prepare($sql);    
$sth->execute();
header('Location:index.php');
    
}
  
?>