1
I have a form that contains a total of 45 textarea
(I will post only the first part here).
When do I send this information from form
one-page PHP, that only displays what has been passed by POST, part of the information is not received.
Form:
<form action="./?p=upg&f=agenda" id="autoForm" method="post">
Textareas:
<td><textarea class="w100 form-control send" rows="4" name="cp1"></textarea></td>
<td><textarea class="w100 form-control send" rows="4" name="cp2"></textarea></td>
<td><textarea class="w100 form-control send" rows="4" name="cp3"></textarea></td>
<td><textarea class="w100 form-control send" rows="4" name="cp4"></textarea></td>
<td><textarea class="w100 form-control send" rows="4" name="cp5"></textarea></td>
PHP page:
print_r($_POST);
Even when I fill out all the textarea
and send the form, only displays the first element, the rest appear empty.
Array ( [id] => 1 [cp1] => CAMPO1 [cp2] => [cp3] => [cp4] => [cp5] => [cp6] => [cp8] => [cp10] => [cp9] => [cp12] => [cp15] => [cp16] => [cp20] => [cp25] => [cp18] => [cp24] => [cp30] => [cp7] => [cp14] => [cp21] => [cp28] => [cp35] => [cp32] => [cp40] => [cp27] => [cp36] => [cp45] => )
It doesn’t make much sense no. Should pass the values :/
– Sam
Does your form make the Submit pure or do you have some script that handles the data before? Look at this one print a script running exactly as "told by you", with 45 "cp" fieldsx"... Another thing: your print_r() is only returning 28 fields, and in the question you said there are 45... Post your full code there to see. You probably have something on this data and you didn’t notice...
– LipESprY
I discovered the error. I don’t really know what happened, but several textarea fields were with repeated names. Thanks for the help. I think I’ve been so much trying to observe other things that could give the error and looking only at the first fields that I didn’t notice that PHP returned a lower amount of fields than what I was sending. Thank you very much.
– Henrique Casagrande B