<?php
include("config/db.php"); // ✅ correct path

$id = (int)$_POST['id'];
$description = mysqli_real_escape_string($conn, $_POST['description']);

$sql = "UPDATE slider SET description='$description' WHERE id=$id";
mysqli_query($conn, $sql);

header("Location: slider.php");
exit;
