In the file people_edit.php, there's a form that includes this code:
// If this person has a photo, show the file name of that photo and a link to change the image (or drop the photo)
if (@$row_person['photo']) {
echo "$row_person[photo] <a href=\"people_edit.php?p=$row_person[person_id]&i=$row_person[photo]&drop_photo=1\"><span class=\"t8-r\">change image</span></a>";
// If this person does not have a photo already, provide the form field so they can add one.
} else {
echo "<input type=\"file\" name=\"photo\" size=\"25\" style=\"font-family: Arial, Helvetica, sans-serif; font-size: 9pt;\">";
}
If they click on the "change image" link, it calls the same page. At the top of this page is this code:
// If dropping a photo, update the database so that it contains no file, and delete the file from the server
if (@$drop_photo) {
$sql_drop=mysql_query("UPDATE person SET photo='' WHERE person_id=$p");
unlink ("/photos/$i");
}
One potential complication is the directory paths. The people_edit.php file is here:
[url]http://[/url]/manager/people_edit.php
The photo is here:
[url]http://[url]/photos/[file_name]
I've tried everything I can think of, but I always get the same error: unlink() failed (No such file or directory)