RE: [PHP] Pass variables via URL
| From: | Martin Towell | Date: | Thu, 11 Apr 2002 23:53:11 +0000 |
| Subject: | RE: [PHP] Pass variables via URL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-92680@lists.php.net to get a copy of this message | ||
missing an "echo" - <?php echo $image ?>
-----Original Message-----
From: Craig Westerman [mailto:westerman@chanuteks.com]
Sent: Friday, April 12, 2002 9:45 AM
To: php-general-list
Subject: [PHP] Pass variables via URL
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