sogang145 — 2013-09-20T07:04:32-04:00 — #1
I'm making an Admin Panel and i want to allow to site administrator to add, edit and delete site contents.
the problem i have is that in edit form i want to show old images of gallery in input file so that site administrator can change any of them.
but i can't show old images of gallery in input file so that can change them and when i want not to change the image and press submit button, old image is removed from db, in fact in new insert query doesn't store anything for image field :((
i hope solve this problem soon
thank you so much for helping me
rubble — 2013-09-20T07:48:07-04:00 — #2
You can display your old images in a table with a database query and have a check box associated with each image - the table is built into a form. The site owner will check the boxes of the images they want to remove and then submit the form; the images to delete are then input into an array. You will then have an array of images to delete; write a loop that goes through the array and runs a database query to remove each item from the database one at a time.
in fact in new insert query doesn't store anything for image field
This must be a programming error and nobody will be able to help you without seeing some code.