Karina S schrieb:
> Hi,
>
> I put pictures from a database ont the page about my products. If the user
> click on a picture I want to give a detailed description about the product.
> But how can I get, which picture was selected?
>
> Thanks
>
>
if your images are named like
PicNr000.png, PicNr001.png, PicNr002.png, ..
and you have about 30 pics, do something like:
<?php
$pic_count=0; $max_pic=30;
if (isset($picnr) && ($picnr>=$pic_count) && ($picnr<$max_pic)) {
// print out the info of image number $picnr
?>
...
<?php
}
?>
...
<?php
while ($pic_count<$max_pic) {
?>
...
<a href="<?php echo $PHP_SELF."?picnr=".$pic_count; ?>">
<img src="PicNr000.png" border="0" name="PicNr000">
</a>
...
<?php
$pic_count++;
}
?>
than the script itself is called with the number of the pic ...
this is not a pretty way but it should work ...
--
@ Goetz Lohmann, Germany | Web-Developer & Sys-Admin
\/ ------------------------------------------------------
() He's the fellow that people wonder what he does and
|| why the company needs him, until he goes on vacation.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php