I need some info to help you out. Tell the procedure:
How did you retrieve the images from system or database?
if database, what is the method? blob or url?
When will you mark your images as checked?
Store the image name or some id into a varibale probably array.
Finally you have a generated array of selected images.
Establish the connection to database retrieve the images that is in your array.
Create the slideshow with the images.