What I want to do is that the extention that is saved in the database is deleted but the image of the folder where it was saved is also deleted
What I want to do is that the extention that is saved in the database is deleted but the image of the folder where it was saved is also deleted
You can delete the image in the directory where it is after or before (as you prefer, considering that afterwards you must have stored in some variable its location) to delete its database record with PHP functions. Have you researched about how to delete files from a directory with PHP ?. There are several examples on the web I leave one:
$dir = "/directorio/"; /*Ruta local donde se almacenan tu imagen*/
$file = "imagen.jpg"; /* Nombre de tu imagen */
unlink($dir.$file); /* Eliminas tu Imagen*/
This is based on the labels you entered in the question. Greetings I hope you serve.