Answer the question
In order to leave comments, you need to log in
Why doesn't passing an array via POST work?
Good day. There is a need to transfer an array via POST.
For this I use inputs of the form
<input class="hidefield" hidden="hidden" type="text" name="devices['<?php echo $ipu_data['base_id']; ?>'][base_id]" value="<?php echo $ipu_data['base_id']; ?>">
. <input class="hidefield" hidden="hidden" type="text" name="company" value="<?php echo $_POST['company']; ?>">
<form action="http://site.ru" method="post">
<input class="bs form-control new_meterage_input" type="text" name="devices['2'][new_meterage]" value="blabla" >
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][base_id]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][search]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][id]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][street]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][house_number]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][app_number]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][device_id]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][description]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][device_type]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][old_meterage]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][c_kod]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][block]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['2'][base]" value="blabla">
<input class="bs form-control new_meterage_input" type="text" name="devices['6468'][new_meterage]" value="blabla" >
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][base_id]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][search]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][id]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][street]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][house_number]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][app_number]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][device_id]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][description]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][device_type]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][old_meterage]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][c_kod]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][block]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="devices['6468'][base]" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="company" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="street" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="house_number" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="appartment_number" value="blabla">
<input class="hidefield" hidden="hidden" type="text" name="id" value="blabla">
<input type="submit" name="ipu_save_submit" class="btn btn-default" value="Сохранить">
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question