I have some thumbnail images with its larger version.I placed the thumbnail images in a page.Now for link I just gave a link
<a href="image/largerimage1.jpg"><img src="thumbnail1.jpg></a>
but for this I have to make different pages for showing larger one.I want to give a link to show them in a single page.means whenever I will click the thumbnail it will open the larger one in a page with the same url but with its name like
imagegallery.php?news=images/largerimage1/13.jpg
imagegallery.php?news=images/largerimage1/14.jpg
so how to do that?
Pretty basic stuff, I suggest you get to read some PHP tutorials on the internet to get some knowledge on one thing and another.
The
?news=part in your URL is a parameter that can be read by PHP. This type is known as$_GET. To get this part you would need$_GET['news']so if we’d use your first link and place this inside a script:echo $_GET['news'];the page would sayimages/largerimages1/13.jpg.In order to get the image loaded on your website we need some simple steps, I’m changing the
newsparameter intoimage, that suits better for your script since it ain’t news items:Below this script you can put all your thumbnails the way you want. Ofcourse, also for these thumbnails there are some automated options. But I strongly suggest you get a good look at the script above and some beginner PHP tutorials so you completely understand the example given. This still isn’t the best method, but it’s kicking you in the right direction.