<?php
$servername = "localhost";
$username = "savarnai_payment";
$password = "techno@123";
$dbname = "savarnai_payment_db";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
  die("Connection failed: " . $conn->connect_error);
}

	$s=$_SERVER["SERVER_NAME"];
$school_name= strstr($s, '.', true);


$status=$_REQUEST['status'];

$txnid=$school_name."_".$_REQUEST['txnid'];


 $sql = "UPDATE mss_pay_log SET soft_update='$status' WHERE txnid='$txnid'";


if ($conn->query($sql) === TRUE) {

         $status = 1;

 $array = array("status"=>$status,);
  echo json_encode($array);
}   
 else {
  echo "Error: " . $sql . "<br>" . $conn->error;
}
?>