Re: Re: Opening a Dynamic Pop Up Window

From: Date: Thu, 29 May 2003 21:30:50 +0000
Subject: Re: Re: Opening a Dynamic Pop Up Window
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-149494@lists.php.net to get a copy of this message
        First thanks for your help!..   I have the variable passing OK to this html page below. But the filename is not making it to the <img src> tag. I think the syntax is off??  I'm thinking maybe the img src tage needs to be broken up to allow the $image var to process?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>
        <title>Test image</title>
</head> <body bgcolor="#000000" text="#ffffff"> <? $image = $_GET['img']; echo "<img src='$image' border=0>"; ?> </body> </html>
Just add some Javascript to the links around your thumbnails, like this: <a href="javascript:window.open('show_photo.php?img=image.jpg');"> Then you need to create a script called show_photo.php that takes the "img" var passed by the Javascript above and loads that image onto the page. $image = $_GET['img']; echo "<img src='$image' border=0>"; Hope that helps. Monty


« previous php.general (#149494) next »