PHP - How to Dynamically insert images
All photos are in the same directory and have same file extension .gif
Goal is to dynamically insert a picture based on incoming url. And if incoming url doesn't have the variable, show a default picture.
URL: http://mysite.com/page.php?$img=imagename
Page code:
<php?
if (empty($_GET['$img']))
echo("<img src=http://mysite.com/images/default.gif>");
else ($_GET['$img1']);
echo("<img src http://mysite.com/images/$img.gif >");
?>
I'm learning php program in my spare time and this is beyond me at this point.
Thanks in advance for any help here.
:)
:)
:)
:)