Log in

View Full Version : Resolved Image based on url?



Briggs
12-14-2009, 09:07 PM
So I've got this website that has a lot of images (over 1000). For almost a year, every time I add images I create a new page for it. But that is getting very tiresome.

I would like to have an automated system to view images from a single php page.

so it would be: page.php?ID=imagename

On that page, have a simple code like

<IMG SRC="<?php echo $picture.'.jpg'; ?>" BORDER="0">

and the image would show up.

Any help would be greatly appreciated!

bluewalrus
12-14-2009, 09:26 PM
<?php
$picture = $_GET['ID'];
?>
Any other code you want then where you want your image.

<img src="<?php echo $picture . ".jpg"; ?>" border="0">

Briggs
12-14-2009, 09:52 PM
well that was easy! thank you very much.