csrtechnew.ohctech.in/update_user_status.php
2025-04-14 13:28:09 +05:30

25 lines
553 B
PHP

<?php
error_reporting(E_ERROR | E_PARSE);
include('includes/config/config.php');
include('includes/functions.php');
include('log_entry.php');
$user_id = $_POST['user_id'];
$status = $_POST['status'];
$user_name = getFieldFromTable('user_name','tbl_users','user_id',$user_id);
// Update the database
$sql = "UPDATE login_check SET is_success = ? WHERE user_id = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param('ii', $status, $user_name);
if ($stmt->execute()) {
echo 'Success';
} else {
echo 'Error';
}
$stmt->close();
$conn->close();
?>