Deleting images with PHP [closed]

1

I'm working on a personal cloud for my girlfriend because her iCloud is full.

Basically this is what is making everything work:

<?php
$dirname = "uploads/";
$images = glob($dirname."*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}", GLOB_BRACE);

usort($images, create_function('$b,$a', 'return filemtime($a) - filemtime($b);'));
foreach($images as $image) {

echo '
 <a href="'.$image.'">
 <img class="img-grid" src="'.$image.'" />
 </a>';
}

?>

EverythingworksperfectlybutIneedtofigureoutabuttonorsomethingclosetotheimages(oreveninsidetheimage)soitcandeletetheimageyouneed.

Rememberthatitmostlyusessmartphone,needingtobeeasytorunonthetouchscreen.Ialsoknowthattheidealwouldbetouseunlink(),butIdonotknowhowtomakeitwork.I'mnewtoPHP.

AtfirstIthoughtofthesolutionbelow,butIacceptanyideas!(Whenclicking,anORpopupappearsorredirectstoanimagepagewhereitcanbedeleted)

    
asked by anonymous 01.08.2016 / 18:30

0 answers