I have the following php code below. I would like that when the user hits the Delete Now button - the picture value is displayed. Regardless of which any button I select the picture05 gets displayed.
I may have a problem getting the selected value from the foreach to the echo code below
<?php
$pic_names = array (
'01' => 'picture01',
'02' => 'picture02',
'03' => 'picture03',
'04' => 'picture04',
'05' => 'picture05',
);
foreach($pic_names as $pic_key => $pic_value){
echo '<a href="?delete=';
echo $pic_value;
echo '">Delete Now!</a><br/>';
}
//Delete Images
if(isset($_GET['delete'])){
echo $pic_value;
}
?>