Hi all
I have build an small personal form to delete images. (personal use only)
The respons I keep getting is "file not found..."
I use the script locAL (WAMP)
THIS IS THE FORM:
<form name="form" method="post" action="delete.php" >
<label>delete
<input type="text" name="delete" id="delete" >
</label>
<label>
<input type="submit" name="send" id="submit" >
</label>
</form>
DELETE PHP
<?php
ini_set('display_errors',1);
error_reporting(E_ALL | E_STRICT);
if ( $_SERVER['REQUEST_METHOD'] == 'POST'
&& isset($_POST['delete']) && trim($_POST['delete']) != '') {
if (file_exists($_SERVER['DOCUMENT_ROOT'].'/upload/'.$_POST['delete'])) {
unlink();
}
else {
echo 'file not found....';
}
}
else {
echo 'fill in something';
}
?>
I have searched and tried some new code.
The files in upload are named "fashion.jpg" and "dog.gif"
I tried it with and without .jpg and .gif. but the only respons "file not found..
Thanks for the feedback