<?php
require_once('db.php');
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
mysqli_set_charset($conn,'utf8');

   $userID= $_POST["userID"];
   $point = $_POST["point"];

$sql = "UPDATE `point_table` SET point = '$point'  WHERE userId ='$userID' ";
    $run = mysqli_query($conn,$sql);
    if($run==true){
    	    $row = mysqli_fetch_assoc($run);
    		 $res->success = 'success';
    	    echo json_encode($res);
    }
    else{
        echo "Failed";
    }
?>