Ages and ages ago, I used Lynda's code as a springboard to create a little PHP popup script. It had one limitation: you couldn't use it with photo thumbnails, because of how I'd coded it.
Many months ago, someone asked for a version of the code that would base the popup link around a thumbnail. I wrote it up, stashed it on my hard drive, and totally forgot about it.
The short version is that it's called like this:
<? thumbnail_popup('/misc/big_photo.jpg', 'Silly, silly felines', '/misc/big_photo_thumb.jpg', 240, 350); ?>
where …
'/misc/big_photo.jpg' is the web path to the larger image,
'Silly, silly felines' is the alt tag and title of the popup window,
'/misc/big_photo_thumb.jpg' is the web path to the thumbnail image,
240 is the width of the larger image (optional), and
350 is the height of the larger image (also optional).
I'm vacationing with my spouse on the East Coast at the moment, so I don't have access to all my usual stuff. I posted a bit more in-depth directions on my site. (You can also just download the code – there's a readme file enclosed with it.) I figured it'd be better to share the code, even in this abbreviated form, rather than forget about it for another six months.