File "update_note.php"

Full Path: /home/leadltht/fastlinkinternet.com/wp-comment-form/reports/update_note.php
File size: 623 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
require_once('/home/leadltht/fastlinkinternet.com/administrator/data-provider/config.php'); // Ensure the correct path to config.php

if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['client_id']) && isset($_POST['note'])) {
    $clientId = $_POST['client_id'];
    $note = $_POST['note'];

    $sqlUpdate = "UPDATE member_list SET notes = ? WHERE id = ?";
    $stmt = $conn->prepare($sqlUpdate);
    $stmt->bind_param('si', $note, $clientId);

    if ($stmt->execute()) {
        echo "Note updated successfully.";
    } else {
        echo "Error updating note: " . $conn->error;
    }
}
?>