View Single Post
  #1 (permalink)  
Old 09-09-04, 07:26 AM
rjwebgraphix rjwebgraphix is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Question Image display based on URL

I'd like to display an image based on the url in a similar fashion that you can display html files based on the address bar.

Example:

http://www.anysite.com/frameset.php?page=home

Then breaking the PHP down to it's simplest form in page frameset.php I have the following code.

<?php
include("$page.html");
?>

in the same respect I would like to change an image in frameset.php based on the url, so it would look something like this.

http://www.anysite.com/frameset.php?...picture=mypic1

I can do this by creating a separate html, adding the pic there, then using the same as the above to display that html, but for anything above a few images, it's kinda redundant. I figure the images are already there and I shouldn't need a separate html file for each image I want to display, so looking looking for it's simplest form to pass the variable to the IMG tag.

Thanks,
RJ
Reply With Quote