<?php
header("Content-Type: application/json");

$maestro_id = $_POST["MaestroID"];
$password = $_POST["Password"];
// echo $maestro_id."/".$password;

include "./../lib/send_reply_json.php";
include "./../setup/connect_db.php";



update_maestro_password($maestro_id, $password);

set_data("maestroPassword", $password);
send_result_success();
exit;



function update_maestro_password($maestro_id, $password) {
	global $db_conn;

	$query = "
		UPDATE license_maestro_password
		SET Password = ?
		WHERE MaestroID = ?
	";
	$stmt = $db_conn->prepare($query);
	$stmt->bind_param('ii', $password, $maestro_id);
	$stmt->execute();
}

?>