Re: Displaying a single picture...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You could do something as simple as this:

<a href="displayPic.php?image=/path/to/image.jpg&title=This is my title"><img src="/thumb.jpg" border="0"></a>

I think most browsers will convert the spaces in the link (when clicked) to '+' or '%20', but this may not be true with some less popular browsers (i don't know).

Then displayPic.php might be something like this (if you have latest PHP version):

displayPic.php ----------------------------

<?php

$image = isset($_GET['image']) ? $_GET['image'] : "/unknown_pic.jpg";
$title = isset($_GET['title]) ? $_GET['title] : "/lost_title.jpg";

?>
<img src="<?= $image ?>"><br>
<?= $title %>

--------------------------------------------------

Hope this helps
Adam

--- Original Message ---
I have several thumbnail images spread out in my website.  I thought it
would be cool to write a single PHP script so that when they click on the
thumbnail, the name of the larger pic would be passed to a PHP script that
displays it on its own page...I don't even care about a link back, they can
just click the browser's back arrow.

How do I get the name stored when they click on the thumbnail?

My confusion is, I'm seeing this one dimensionally.  You click on an image,
it calls a link.  But I need to click on the image, store the name of the
pic I want to display, then call the PHP link.

I've looked at some of the free Image Lib PHP scripts out there....and they
all go waaaay overboard on what I'm looking to do.

Any suggestions?

Thanks


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux