Attribute for $ _POST loses information

0

I have an attribute called $nomeConteudo , which makes a select in my database and returns the value correctly, because through echo I check that the value is normal.

Within a form, I need to send this value to my formaction. For already having the value, I send it by input hidden.

<input type="hidden" name="nomeConteudo" value=<?= $nomeConteudo ?>>

It happens that when I get this value in my action form:

$nomeConteudo = $_POST['nomeConteudo'];

And I give echo $nomeConteudo; , its information is reduced to only the first sentence of what I contain

For example: I have assigned the value informatica media complexity, it will only return me informatica.

I have already looked for solutions and found nothing satisfactory. Would anyone know what's going on?

Here are some images that might help you understand ...

Aftersubmittotheactionform.ContentOnly.Losinginformation"Luiz"

    
asked by anonymous 03.09.2018 / 23:09

1 answer

0

Personally I discovered the problem, I was sending the input this way:

        <input type="hidden" name="nomeConteudo" value=<?=$nomeConteudo;?> >

and the correct one is this:

    <input type="hidden" name="nomeConteudo" value="<?=$nomeConteudo;?>" >

Those blessed quotes gave me a lot of headache. But it's there.

    
04.09.2018 / 22:17