Mini Shell
<?php
header('Content-Type: application/json');
include("../config.php");
$conn = dbconnect();
session_start();
$admin_id = $_SESSION['admin_id'];
$name = $_POST['name'];
$id = $_POST['id'];
$role = $_POST['role'];
// Check if the form was submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Check if a file was uploaded
$sql = "UPDATE `tb1_womensdevelopment`
SET `name` = '$name',
`role` = '$role',
`status` = '1',
`crm_id` = '$admin_id',
`updated_log` = current_timestamp()
WHERE `id` = $id;";
$content_res = mysqli_query($conn, $sql);
echo json_encode(['status' => '200', 'message' => 'inserted successfuly']);
} else {
echo json_encode(['status' => '500', 'message' => 'Invalid request method.']);
}
Zerion Mini Shell 1.0