Re: Re: php question
| From: | michael crane | Date: | Wed, 18 Aug 2004 13:22:08 +0000 |
| Subject: | Re: Re: php question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194151@lists.php.net to get a copy of this message | ||
Torsten Roehr wrote:
"Michael Crane" <crane@ukonline.co.uk> wrote in message news:41228B37.1020500@ukonline.co.uk...many thanks. otherwise I think I can "include" the table in every page that is linked to. which is what I think people do. It's hard to guess when the source is invisible :) Just started with php. cheers mickhello, I have a webpage which includes a frame containing a table made of 24 tds which in turn contain little images. When the mouse clicks on a little image the appropriate larger image is loaded into an adjacentframe.Can somebody point me in the direction to do this in php without frames please ? I've been looking most of the day but I can't see it. regards mickHi Mick, you have to append the file name of the bigger version to your links as a parameter: <a href="<?php= $_SERVER['PHP_SELF']; ?>?image=name_of_the_big_file1">big picture 1</a> <a href="<?php= $_SERVER['PHP_SELF']; ?>?image=name_of_the_big_file2">big picture 2</a> <a href="<?php= $_SERVER['PHP_SELF']; ?>?image=name_of_the_big_file3">big picture 3</a> Exchange name_of_the_big_file1/2/3 with the file names of the big image versions. Then at the point where you want to show the big image include this code: <?php if (isset($_GET['image'])) {$image = basename($_GET['image']); echo '<img src="' . $image . '" border="0" alt="">';} ?> Of course you may have to alter the src attribute if your pictures are not in the same directory. Hope this helps, regards. Torsten Roehr This looks hopeful thanks. Something like this is in the ( don't know what bird that is .?) o'reilly book but I couldn't get it to return anything. what you write is more informational. I will try.