I made a little picture gallery for my website. The images and thumbnails are stored on the server and the information in a database. I know how to delete the information from the databasem, but how would I include instructions in the php script to also remove the thumb and image from the server?
Code:
<?php
if($_GET["cmd"]=="delete")
{
$sql = "DELETE FROM $table WHERE id=$id";
// code to delete images from server
$result = mysql_query($sql);
echo "<br><br><p align='center'><span style='color:red'><b>The Image and Information has been Deleted!<br><br>";
}
?>
Comment