Page 1 of 1

Showing images

Posted: Fri May 06, 2005 1:34 am
by ChristofLaeremans
Hello,

I'm creating a new website for showing my photo's on a webpage. The first code for getting the photo's (jpg files) out off a directory and show it on a webpage works (on the provider I don't have a MySQL database, so I need to work with directories).

I also created a link to the image for showing it in a new page. But now I want to use another page with some text, border etc ... for showing the image.
After searching on the net I found that you can do it with passing arguments like. "weergeven.php?ARG=fungi.jpg" and then write in the weergeven.php "echo $ARG".
But it doesn't work, there is no value in the variable $ARG.

Can someone help me with this problem or is there a more elegant solution ?

Thanks,

Christof Laeremans

Posted: Fri May 06, 2005 2:49 am
by anjanesh
Try
echo $_GET['ARG'];

Posted: Fri May 06, 2005 3:05 am
by malcolmboston

Code: Select all

if (isset($_GET['ARG']))
{
  print "<img src=\"{$_GET['ARG']}\">";
}
else
{
  print "argument not passed";
}

Posted: Fri May 06, 2005 5:22 am
by ChristofLaeremans
Thank you, it works now !

Christof Laeremans