Jump to content

[SOLVED] "echo"ing a variable with HTML inside. Resulting in losing my mind.


kyushudan

Recommended Posts

This text(HTML) resides in a field in a MYSQL dbase:

<img src=&#34;map_pix/Akashi.jpg&#34; width=&#34;200px&#34; height=&#34;100px&#34; alt=&#34;Akashi Castle&#34;>

 

I fetch it then echo it thus:

echo $row['image']. "<br />";

 

The rendered HTML (as it appears in Firefox 3.0):

<img src="map_pix/Akashi.jpg" width="200px" height="100px" alt="Akashi Castle">

 

I check the source, it reads:

<img src=&#34;map_pix/Akashi.jpg&#34; width=&#34;200px&#34; height=&#34;100px&#34; alt=&#34;Akashi Castle&#34;>

 

I can see why but How do I make it executable code? ??? ?

 

Even more confusing is that:

<img src=&#34;map_pix/Akashi.jpg&#34; width=&#34;200px&#34; height=&#34;100px&#34; alt=&#34;Akashi Castle&#34;>

works fine when convert the MYSQL contents into an XML file that is read by a google map. But hey, that's not the problem.

 

 

Apologies if I've posted in the wrong place; php? mysql? html? wasn't sure

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.