Information updated

"; } if (!isset($_GET['id'])) { echo "

No ID present

"; $image_path = "assets/no_image.png"; $image_alt = "No image could be found, sowwy"; } elseif (empty($image['imagename'])) { echo "

Could not find image with ID: ".$_GET['id']."

"; $image_path = "assets/no_image.png"; $image_alt = "No image could be found, sowwy"; } else { $image_path = "images/".$image['imagename']; $image_alt = $image['alt']; } ?>
"; ?>

Description

No description provided

"; }else{ echo "

".$image_alt."

"; } ?>

Details

ID: ".$image['id']."

"; // File name echo "

File Name: ".$image['imagename']."

"; // Image Upload date echo "

Upload Date: ".$image['upload']."

"; // Image resolution list($width, $height) = getimagesize($image_path); echo "

Image resolution: ".$width."x".$height."

"; ?>

Danger zone

"; echo ""; echo ""; // Check if query is set if (isset($_POST['delete'])) { // Try deleting image if(unlink("images/".$image['imagename'])) { // If deleted, delete from Table $image_delete_request = "DELETE FROM swag_table WHERE id =".$image['id']; $image_delete = mysqli_query($conn,$image_delete_request); if ($image_delete) { // Deleted image header("Location:index.php?del=true&id=".$image['id']); } } else { // Could not delete from file echo "

Error: Coult not delete image

"; } } ?> Modify image content"; ?>