Jump to content

[SOLVED] Same Page, Different Images


GeekyG

Recommended Posts

Hello,

 

In the “featured work” section of my new portfolio, I am using image screen shots of the project, anywhere from 1 to 10 images depending on the size of the project. Although I got everything to work correctly, I realize now that these images, are really slowing down the download time of the page. Not good. Essential all of the images are “hidden” until the end-user clicks on a button.

 

Here is the url: http://www.multimedia-designs.com/V3/HTML/projects/featured_project.php

 

Using PHP, what is the best way to have the same page but a different image when the end-user clicks on a button?

 

I like the way this website displays the images: http://www.benhulse.com/web/dunnett-1.php . Is this just using the include function? If so, is this the best way?

 

All help is appreciated.  :)

 

Link to comment
https://forums.phpfreaks.com/topic/87048-solved-same-page-different-images/
Share on other sites

If you want it this way http://www.benhulse.com/web/dunnett-1.php you will need to do.

 

1) Create a php script that takes the pictures id from the url, using the $_GET function.

2) using the Id from the url change your img source to look something like <img scr  = filepath/$id. Then change the pictures name to = this id

3) Create something similar to a pagination script to help create a number of image links depending on the number of images you have.

 

 

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.