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

mysqli_set_charset($conn,'utf8');
				

$Insert_point=trim($_POST['point']);
$Insert_userID=trim($_POST['userId']);



  $sql = "INSERT INTO `point_table`(`point`, `userId`) VALUES ('$Insert_point','$Insert_userID')";
  $run = mysqli_query($conn,$sql);
    
if($run==true){

        $res->success = 'Point Up Successfully';

       echo json_encode($res);
 }
else{
      echo "Failed";
    }


   


?>