PHP - Deleting variable and file together
Hi,
I have file uploading system which saves file and some info about it:
PHP Code:
$target_path = "uploads/"; // directory CHMODed to 777.
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path);
$filename = basename($_FILES['uploadedfile']['name']);
so I have file saved in uploads/ and also I have $filename
how I can delete file and all the row in mysql by pushing one button???
If you need more info -ask :) thanks ;)