SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Editing images gallary so that they are shown in edit form

    Hi everyone,
    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

  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,392
    Mentioned
    81 Post(s)
    Tagged
    3 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
    This must be a programming error and nobody will be able to help you without seeing some code.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •