I have initialized a variable called lets say a = 0;
when the user clicks the button for next picture, a is incremented by one and there for i need to call the picture with the id of the value of ‘a’.
Would the best way to do this be to run a query every time the button is clicked, or rather store all the images in an array and call the ‘a-th’ value of the array on click?
Please Help, Much Appreciated, Thanks!
There’s cons to both situations.
if you load all images and save to array that 1st picture might take time to load and the user might no even be interested in going to the rest.
if you load as they click next then it might take a while for each image loads.
when uploading images
then save $filename to your table
To view them in gallery
and using something like Lightbox you can use jquery to make a popup to view larger or add a hyperlink to each image so they can view in a seperate page the full size image.