"Ben Sharvy" <bs*****@mac.com> wrote in message
news:d1**************************@posting.google.c om...
I can't get the following page to display the img, whose name is
passed in the URL. The variable, showme, is the name of a jpg file
(e.g., coolpict.jpg). It is being passed correctly, as verified by the
echo line (only there for testing purposes), but it doesn't get
translated in the img tag.
<html>
<head>
<title>Images</title>
<style type="text/css">
body {background:gray; text-align:center;}
img {margin:10%;}
</style>
</head>
<body>
<? echo $_GET['showme'] ?>
<img src= <? $_GET['showme'] ?> >
</body>
</html>
The correct shortcut for outputting a variable is <?= $_GET['showme'] ?>.
You're missing the equal sign.