Re: Hyperlink using thumnail

From: Date: Wed, 24 Jan 2001 04:36:07 +0000
Subject: Re: Hyperlink using thumnail
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-36326@lists.php.net to get a copy of this message
Dave, Here is a bare-bones example. You will notice that you don't need to hard code the thumbnail on the first page either as long as are consistent in file naming with a set prefix differentiating thumbnails from their larger pix. page_one.php: <? $pic_name = 'big.jpg'; echo "<a href=\"page_two.php?id=$pic_name\">click to enlarge</a>"; echo "<img src =thumb_$pic_name>"; ?> page_two.php: <? echo "<img src =\"$id\">"; ?> Best regards, Andrew ------------------------------------------ Andrew Hill Director Technology Evangelism OpenLink Software http://www.openlinksw.com XML & E-Business Infrastructure Technology On 1/23/01 9:23 PM, "Dave Stewart" <dexter@ihug.co.nz> wrote: > Hi again, > > How do I link this image file so that when users click on it they get > the bigger version (which is named xxxxxxxx01.jpg). > > <? > > $photo = file_exists("th_xxxxxxxx01.jpg") ? "<IMG > SRC=\"th_xxxxxxxx01.jpg\">" : "No Photo Yet<br>\n"; > > echo "$photo"; > > ?> > > Here is the html version of what I am trying to do, as you can see the > 'xxxxxxxx' is a variable. > > <p align="left"><a href="race02.jpg"><img > src="th_race02.jpg" > alt="CLICK TO ENLARGE"></a></p> > > Thanks again, > > Dave > >

« previous php.general (#36326) next »