Squirrel86 Posted November 15, 2005 Share Posted November 15, 2005 Honestly, I wouldn't know where to start a search on this one. I've looked through my DWMX04 Bible, a Google search, and... well, that's about it. This has GOT to be an easy thing to do, I just don't know how to do it! So anyhow, I'll start with an explanation of the intended result I'm after: A user clicks a thumbnail on one page, and the next shows the large version of the image, on a BUILT page, not just the image itself. What I've got: an index.php in the root of my site that needs to tell image.php what image to display in the image display area. I've got a MySQL database set up for the site, but I have NO IDEA what I'm doing with PHP coding or how to get the variables to work. (I could do this if I could write it in VB6 code! ARG!) Anybody? Quote Link to comment https://forums.phpfreaks.com/topic/2864-getting-one-page-to-display-an-image-linked-by-another/ Share on other sites More sharing options...
Squirrel86 Posted November 16, 2005 Author Share Posted November 16, 2005 Anyone? It seems simple enough... :S Quote Link to comment https://forums.phpfreaks.com/topic/2864-getting-one-page-to-display-an-image-linked-by-another/#findComment-9688 Share on other sites More sharing options...
redbullmarky Posted January 13, 2006 Share Posted January 13, 2006 [!--quoteo(post=319297:date=Nov 16 2005, 11:33 PM:name=.Squirrel)--][div class=\'quotetop\']QUOTE(.Squirrel @ Nov 16 2005, 11:33 PM) 319297[/snapback][/div][div class=\'quotemain\'][!--quotec--] Anyone? It seems simple enough... :S ok, you may need to provide a bit more detail, but i'll have a bash, as it really depends how you've done things so far. if you've literally hard coded the images into the index page (ie, youre not using a PHP loop to display the images) then each image could have a hyperlink such as: <a href="image.php?image=a_picture.jpg"><img src="a_picture.jpg" /></a> when you click this link, image.php will open and you'll see in the URL something like: [a href=\"http://yoursite.com/image.php?image=a_picture.jpg\" target=\"_blank\"]http://yoursite.com/image.php?image=a_picture.jpg[/a] in your image.php file, just put the image in like this: <?php $image = $_GET['image']; // gets the filename from URL ?> ** and put a line similar to this where you want your image to appear <img src='<?php echo $image; ?>' /> that should set you on your way cheers mark Quote Link to comment https://forums.phpfreaks.com/topic/2864-getting-one-page-to-display-an-image-linked-by-another/#findComment-10858 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.