PHP and mysql picture system

playminigames

New Member
Messages
216
Reaction score
6
Points
0
Ok so im developing this site, and i almost have the whole picture part working perfectly, except when i added the delete picture function it messes everything up. the reason for this is because say you have pictures

1. 2. 3. 4.

they all have an album id, and the system figures out the next picture based on this, and when you delete anything but the last one it still tries to go to the image that was deleted. im not sure if anyone can help with this, but if you need code or anything im willing to help you in anyway to fix it.

Thanks!
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Once you delete the picture then you have to update the whole list and get it refreshed the data which the function(system as you said) is using.
 

playminigames

New Member
Messages
216
Reaction score
6
Points
0
gsonline knows exactly what im talking about, but im not sure how to redo all of the numbers so there are no skipping from 1 to 3 or whatever. Can anyone point me to something like that, or give me an idea of how to code it. Thanks!
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
You are loading the images using the album id right. When you delete any picture then you have to re- fetch the images list again. so the next one in the list will be updated with the picture which is available.
 

playminigames

New Member
Messages
216
Reaction score
6
Points
0
i think i have come up with something, ill update when im done with it if it works or not.

EDIT:

Thanks everyone for their help, i got it working now!
 
Last edited:
Top