Jump to content

Display several images on a page in the same location


melsworld

Recommended Posts

Hi, I want to be able to load several images into the same location on a page without having seperate pages and links to each page for each image For an example of what I am trying to do see this link http://coalters.mobi/particulars/controlle...334&index=0I am failry new to php and to be honest a bit lost on thisI am guessing here:the controller.php?page is the page where the information is called from the databasephoto is a field in the databaseid is a field in the database probably the property reference numberand index=0 - now I am lostAs you go from one image to the next the index increases e.g index=1 index=2 etcIs the index a field in the database or is it an expression used in phpCan anybody tell me how to achieve what they are doing and give me some coding hints please as to how this should be set upThanks Mel

Link to comment
Share on other sites

This is what the link looks like:

http://coalters.mobi/particulars/controller.php?page=photo&id=8652334&index=0

The page itself is this page:

http://coalters.mobi/particulars/controller.php

These are the variables that are passed to the page:page=photoid=8652334index=0The "page" variable is set to "photo", which probably tells the controller.php script to show the photo gallery. The id variable is probably an ID number in the database for the entire photo gallery, and index tells the script which picture in the gallery to show. I assume. The index can either be saved in the database along with the photo, or it might just be used by PHP to know how many pictures to skip before showing the one they want to show, and whether to show the previous or next links.Check on the w3schools site for the PHP Forms tutorial, and also read the PHP tips topic in this forum for some more information. That will tell you how to read variables in the querystring. Do a search online for PHP pagination to see how some people set up the next and previous links.

Link to comment
Share on other sites

This is what the link looks like:
http://coalters.mobi/particulars/controller.php?page=photo&id=8652334&index=0

The page itself is this page:

http://coalters.mobi/particulars/controller.php

These are the variables that are passed to the page:page=photoid=8652334index=0The "page" variable is set to "photo", which probably tells the controller.php script to show the photo gallery. The id variable is probably an ID number in the database for the entire photo gallery, and index tells the script which picture in the gallery to show. I assume. The index can either be saved in the database along with the photo, or it might just be used by PHP to know how many pictures to skip before showing the one they want to show, and whether to show the previous or next links.Check on the w3schools site for the PHP Forms tutorial, and also read the PHP tips topic in this forum for some more information. That will tell you how to read variables in the querystring. Do a search online for PHP pagination to see how some people set up the next and previous links.

Thanks for the information - have just looked at PHP pagination on Google search - looks way over my head at the moment so may have to stick to loading individual pages for each image, which is a pain as it is going to be a mobile site but need to get something up in the short term and then study pagination when I have a few spare momentsThanks Mel :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...