Wouldn't it be simpler to pass the filename you want to have as the image?
Instead of:
<input type="hidden" name="line" value="<img src="http://slclimo.com/line.gif" width=400 height=2>">
to return:
<img src="http://slclimo.com/line.gif" width=400 height=2>
You could have:
<input type="hidden" name="line" value="www.slclimo.com/line.gif">
to return:
$line = "http://". $HTTP_POST_VARS['line'];
and then just echo your img line like this:
echo ("<img src=\"". $line ."\" width=\"400\" height=\"2\">");
If you need to pass the image name as well as the height and width, you can try:
<input type="hidden" name="line" value="www.slclimo.com/line.gif,400,2">
and then:
$imageVars = explode($HTTP_POST_VARS['line'], ",");
$imageName = "http://". $imageVars[0];
$imageWidth = $imageVars[1];
$imageHeight = $imageVars[2];
echo ("<img src=\"". $imageName ."\" width=\"". $imageWidth ."\" height=\"". $imageHeight ."\">");
If you are looking to return simply the <img> line (as the literal characters, not actual HTML), then use the above example, with the following change:
$imgString = htmlentities("<img src=\"". $imageName ."\" width=\"". $imageWidth ."\" height=\"". $imageHeight ."\">");
I may have got slightly off topic, but I think that's what you were looking to do.