Mini Shell

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

<?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'];
$mobile = $_POST['mobile'];
// Check if the form was submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // Check if a file was uploaded

    $sql = "UPDATE `tb1_alumini` 
    SET `name` = '$name',
        `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