http://www.myu2sig.com/checkit.php
The below code is from the above URL, what I would like to have done is have some code added that takes the (Delete) beside each name and turn it in to a clickable link that deletes ONLY the mage it's attached to. So if delete is hit for image A it leaves images B and C alone (each image should delete independantly of the others).
So, here's my question... would someone please modify the below code for me to achieve this ?
Ideally when the Deleter link is clicked for the associated image the page would refresh and show the remaining images. Like right now there's three images, so if I delete one the page would refresh and show the remaining two.
<?php
echo '<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>';
$link = mysql_connect('localhost', 'USER', 'PASS');
mysql_select_db('DBASE', $link);
if ($handle = opendir('DIRECTORY_PATH')) {
while (false !== ($file = readdir($handle))) {
$file = str_replace(".png", "", $file);
$ssql = "QUERY";
$sresult = mysql_query($ssql);
if(!mysql_num_rows($sresult)){
if ($file != "." && $file != "..") {
echo $file, ' (Delete)<br />';
echo '<img src="BASE_URL', $file, '.png"><br /><br />';
}
}
}
closedir($handle);
}
echo '</body></html>';
?>