query("INSERT INTO `gallery` (`id`, `timestamp`, `title`, `image`) VALUES (NULL, CURRENT_TIMESTAMP, '$title', '$file_name')"); echo ''; } else { echo ''; } } if (isset($_GET['action']) && $_GET['action'] == 'del' && isset($_GET['id'])) { $id = mysqli_real_escape_string($con, $_GET['id']); $file = isset($_GET['file']) ? mysqli_real_escape_string($con, $_GET['file']) : ''; if (!empty($file) && file_exists("../uploads/gallery/" . $file)) { unlink("../uploads/gallery/" . $file); } $con->query("DELETE FROM gallery WHERE id = '$id'"); echo ''; } ?>

Add Gallery Image

Gallery Images (Drag to reorder)

query("SELECT * FROM gallery ORDER BY seq ASC"); if ($get->num_rows): while ($g = $get->fetch_assoc()): ?>
# Image Action
Gallery Image Delete
No images in gallery