I have 2 variants when they are no longer null are created two buttons, the problem is that one always appears hidden, if I inspect the code it is there, however on the screen nothing appears, I am suspicious that is because the two are trying to be created in the same place, and one is bugging the other.
Error creating button code:
if (isset($_POST['escondido']))
{
print "<button type='button' href='' target='' class='btn btn-danger' data-toggle='modal' data-target='#modalImagens'><strong>Imagens do componente</strong></button>";
}