<?php
include 'config.php';

$image = $_POST['image'] ?? '';
$click_link = $_POST['click_link'] ?? '';

if(empty($image) || empty($click_link)){
    die(json_encode([
        "status" => false,
        "message" => "Missing Parameters"
    ]));
}

mysqli_query($conn, "INSERT INTO slider(image, click_link)
VALUES('$image', '$click_link')");

echo json_encode([
    "status" => true,
    "message" => "Slider Added"
]);
?>