1
Good morning!
Guys! To with database more than 25 thousand records. I’m reformulating the database because it’s very disorganized so I’m building a script to do everything automatic because do 1 by 1 does not roll right.
The doubt is following, it has a text field, in this field there are tag’s
but at the time of starting the process it is converting or removing tags.
She’s recording it this way <b>
for <b>
What I want is <b>
for <b>
It cannot convert or remove, what to do?
Follows the script.
while($r = mysqli_fetch_array($query)){
$texto = htmlentities(str_replace('\'', '"', $r['artigo']), ENT_QUOTES);
$qy = mysqli_query($con, "INSERT INTO posts SET titulo='{$titulo}', texto='{$texto}', chamada='{$r['chamada']}', view='{$r['visto']}', categoria='{$t}', img='{$r['id']}.jpg', data='{$r['dat']}', destaque='{$destaque}', link='{$link}'") or die(mysql_error());
}
then you cannot use htmlentities. Example $text = "<b>text</b>" htmlentities($text) <b>texto</b>
– user60252
@Leocaracciolo but what way to do then? For if I take out htmlentities they are sent only text. I want to send with tags.
– Augusto Junior
It’s really hard to explain, I’ll try to explain again. Example: pulling information from the bank and throwing the tags right into the bank. If I use htmlentities they are converted. I understand now?
– Augusto Junior