Mysql characters

Asked

Viewed 36 times

0

I am with a registration system in one of the fields I insert an html code:

<iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FLelegameplayy%2Fvideos%2F513067752776685%2F&show_text=0&width=560" width="560" height="315" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allowFullScreen="true"></iframe>

But in the database it looks like this:

<iframe src=&#34;https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FLelegameplayy%2Fvideos%2F513067752776685%2F&show_text=0&width=560&#34; width=&#34;560&#34; height=&#34;315&#34; style=&#34;border:none;overflow:hidden&#34; scrolling=&#34;no&#34; frameborder=&#34;0&#34; allowTransparency=&#34;true&#34; allowFullScreen=&#34;true&#34;>

excluding all accentuation

Structure of the database Estrutura do campo

  • How are you entering the data? Enter the code you are using to perform the Insert.

  • I am inserting an input text

1 answer

0

Matthew, put the CHARSET and the COLLATE of your tables (or the entire database) the same as your PHP is using and both are accentuated compatible.
For example, in the database your tables should be created like this:

CREATE TABLE IF NOT EXISTS `TAB1` (
  `id` int(6) unsigned NOT NULL,
  `content` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 COLLATE = utf8_general_ci;

And on your PHP pages put the tag below inside the <header> of HTML.

<meta charset="UTF-8">
  • friend even though it didn’t work

  • You changed the charset and collate of the table, inserted the data in it again, and even then at the time of displaying on the page this coming without the accents? If you run a select in this table (by some tool, even by the terminal) is the return also without accentuation? If so, the problem may be when making the Internet

  • The return of the database to page has to send me a video instead it shows this "No route found for "GET /partnerships/slide/%22https://www.facebook.com/plugins/video.php" (from "https://eofgames.com.br/parcerias/slide/cads.php") Go to the home page"

  • its I put manually directly in the database the value: <iframe src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2FFadegameraovivo%2Fvideos%2F37673024267%2F&show_text=0&width=560" width="560" height="315" style="border:None;overflow:Hidden" scrolling="no" frameborder="0" allowTransparency="true" allowFullScreen="true"></iframe> it returns the video but when I try to send by an input the database changes the quotes

  • @Mateustorresdasilvacrs, I understood, I believe the problem is at the time the input sends the data by GET, because it goes through the URL, and in it some characters are changed (such as spaces and quotes), before sending the text you must find with the function urlencode this will convert the special characters, and the page that receives this data should use the function urldecode that so they will be converted to the original format and then do the Insert in the bank.

Browser other questions tagged

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