I am building a static website, and I have images in my index page each image has a title name, how do I make an image clicked to open in a different window if clicked, I have a template page designed to be used for opening an image in a different window if clicked but I don`t know how to configure everything. Secondly, I would want the image to be placed in a particular section in the template page.

5 Years
Discussion Span
Last Post by samsnov

This could be achieved with php on the template page, and using a URL like my_script.php?file=img.png&t=my%20image.

I will provide an example.

<title>Gallery : <?php echo $_GET['t']; ?></title>
<body><div align="center">
<tr><td><b><?php echo $_GET['t']; ?></b></td></tr>
<tr><td><img src="images/<?php echo $_GET['file']; ?>" /></td</tr>

sorry about any wiered caps, used iOS to publish this.
This code obviously requires some added security, and you can open the window with JavaScript.


Thank you very much Mathew this served me very well, I wasn`t arround to reply this post on time I am sorry for thst

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.