Re: Pass variables via URL
| From: | phplists at woodenpickle dot com | Date: | Sat, 13 Apr 2002 04:33:40 +0000 |
| Subject: | Re: Pass variables via URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92851@lists.php.net to get a copy of this message | ||
This works:
<img src="<?php echo( "$image.gif" ) ?>" width=150 height=100
border=0>
This works too if you're not opposed to using straight php:
<?php
print "<html>\n<head>\n<title>Image Switch</title>\n";
print "<div align=center><img src=\"$image.gif\" width=150 height=100
border=0></div>\n";
print "</body>\n</html>";
?>
Later,
Bob Weaver
"Craig Westerman" <westerman@chanuteks.com> wrote in message
news:DEECKMLOFODOLNHCJBFPKEENEGAA.westerman@chanuteks.com...
> I'm trying to set $image = imageA via a URL:
>
> http://www.abc123.com/php001/image_switch.php?image=imageA
>
> Script is:
>
> <html>
> <head>
> <title>Image Switch</title>
> </head>
> <body>
>
> <div align="center"><img src="<?php $image ?>.gif"
> width="150"
height="100"
> border="0"></div>
>
> </body>
> </html>
>
>
> Image link ends up as:
> http://www.abc123.com/php001/.gif
>
> Link needs to be:
> http://www.abc123.com/php001/imageA.gif
>
> What am I doing wrong?
>
> Thanks
>
> Craig ><>
> westerman@chanuteks.com
>