html and mysql special characters

Asked

Viewed 35 times

-1

People I have video registration system via IFRAME but when I want to show the iframe it is empty because the database converted

Original iframe code

https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FMarvrikLIVE%2Fvideos%2F386994741992059%2F&show_text=1&width=560" width="560" height="483" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media" allowFullScreen="true">

In the database

https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FMarvrikLIVE%2Fvideos%2F386994741992059%2F&show_text=1&width=560" width="560" height="483" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media" allowFullScreen="true">

a imagem

Here we see the image when I enter the code manually in the mysql field and the blank side when I enter via registration

1 answer

0


Matthew, this is happening because the character " is being switched to ", this is normal because reserved characters in HTML are replaced by your hml entities. Behold here the complete list.

When displaying use the method html_entity_decode php, it will replace the Entity code with its correct symbol.

echo html_entity_decode('https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FMarvrikLIVE%2Fvideos%2F386994741992059%2F&show_text=1&width=560" width="560" height="483" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media" allowFullScreen="true">'); 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.