Mini Shell

Direktori : /home2/aravindar/public_html/admin/ajax/
Upload File :
Current File : /home2/aravindar/public_html/admin/ajax/addncc.php

<?php
header('Content-Type: application/json');
include("../config.php");
$conn = dbconnect();
session_start();
$admin_id = $_SESSION['admin_id'];
$name = $_POST['name'];
$role = $_POST['role'];
$mobile = $_POST['mobile'];
// Check if the form was submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // Check if a file was uploaded

    $sql = "INSERT INTO `tb1_ncc` (`id`, `name`, `role`, `mobile`, `status`, `crm_id`, `created_log`, `updated_log`) VALUES (NULL, '$name', '$role', '$mobile', '1', '$admin_id', current_timestamp(), current_timestamp());";
    $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