charlie321 Posted March 21, 2019 Share Posted March 21, 2019 Hi.. I am relatively new. I am trying to show an image link in my code below: $image = "<img src=<imgpg/" . $part_no . ".JPG />"; <td class = "guide_body" width = "66%"></td><td align = "center"><?php echo $image;?> There is more code but these are the problem lines I believe. Both are within the php environment. This is producing: http://localhost/%3Cimgpg/AF00016B.JPG It is supposed to look like this: http://localhost/imgpg/AF00016B.JPG So it is adding %3C for some reason between localhost and imgpg directory. I have no idea why this is happening. Is there something I can do to prevent this from happening? Or is there something I can do to erase the extra characters. (I'm not sure if they might be different though at some point. I have the same problem both on my local computer and the remote server.) Thanks very much for any help!! Quote Link to comment Share on other sites More sharing options...
requinix Posted March 21, 2019 Share Posted March 21, 2019 %3C represents a < character. Quote Link to comment Share on other sites More sharing options...
benanamen Posted March 21, 2019 Share Posted March 21, 2019 You have a malformed image tag. Forget the error prone escaping gymnastics. $image = "<img src='imgpg/$part_no.JPG'>"; Quote Link to comment Share on other sites More sharing options...
charlie321 Posted March 21, 2019 Author Share Posted March 21, 2019 OK so what is the solution? Quote Link to comment Share on other sites More sharing options...
charlie321 Posted March 22, 2019 Author Share Posted March 22, 2019 OK figure it out... Thanks very much. You did help me!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.