Welcome Guest, Not a member yet? Register   Sign In
Manage images
#1

[eluser]Oleg Videnov[/eluser]
Hello guys,

I am new here and I am not exactly sure this is the right section,but just a simple question.
I am trying to build simple CRUD admin control panel for creating users.The users have First Name,Last Name and image...no password,nothing else.just these three.The upload is going ok.
I am storing the URL of the image in the database.And everything is displayed correctly.
BUT when I want to edit the information-what should be the procedure for deleting the old image and uploading a new one. I am a bit confused how to do it.Just looking for simple solution.I am sure it exists,just don't know it.


Thanks in advance !

Oleg
#2

[eluser]Toddish[/eluser]
To delete an image, just use unlink($file). Then upload the new image as you initially did, storing the path/filename in the DB




Theme © iAndrew 2016 - Forum software by © MyBB