Jump to content

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.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.