Hello,
I am writing a delete script to delete sql data of an uploaded picture:
studentmgt.php
if (!empty($_REQUEST['student_id']))
{
$student_id = $_REQUEST['student_id'];
$result = mysql_query("DELETE FROM student WHERE student_id =".$student_id) or die(mysql_error());
echo $result;
$confirmation = !$result ? "Gagal menghapus data." : "Data telah terhapus.";
}
Just one problem, the actual picture file (student picture) still remains in the server. I have the file name stored in the sql data, but do not know how to delete the actual file.
Please help.
Thanks in advance.