Mini Shell

Direktori : /home2/aravindar/public_html/admin/ajax/
Upload File :
Current File : /home2/aravindar/public_html/admin/ajax/addalumini.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_alumini` (`id`, `name`, `status`, `created_log`, `updated_log`) VALUES (NULL, '$name', '1', 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