Results 1 to 2 of 2
Sep 20, 2013, 03:04 #1
- Join Date
- Sep 2013
- 0 Post(s)
- 0 Thread(s)
Editing images gallary so that they are shown in edit form
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
Sep 20, 2013, 03:48 #2
- Join Date
- Dec 2005
- Cambridge, England
- 55 Post(s)
- 2 Thread(s)
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