0

Below is my html code

<tr>
<td><input type="text" name="item_name[]" id="itemName_1" class="form-control autocomplete_txt" autocomplete="off" required></td>
<td><input type="text" name="hsn[]" id="hsn_1" class="form-control autocomplete_txt" autocomplete="off" required></td>
</tr>
<tr>
<td><input type="text" name="item_name[]" class="form-control autocomplete_txt" autocomplete="off" required></td>
<td><input type="text" name="hsn[]" class="form-control autocomplete_txt" autocomplete="off" required></td>
</tr>

Below is the code from which i am trying to get value

echo '<pre>';print_r($_POST['item_name']);

But I am able to get single textbox value , not showing the both textbox value. Please help me where I am wrong Thanks in advance.

10
  • you sent it with ajax or form? Commented Jul 24, 2020 at 7:27
  • check out this question stackoverflow.com/questions/14071587/… Commented Jul 24, 2020 at 7:27
  • form action method @SimoneRossaini Commented Jul 24, 2020 at 7:30
  • The form is not allowed into table take a look here, use ajax for sent data. Commented Jul 24, 2020 at 7:33
  • 1
    form tag is outside the table and it is allowed @SimoneRossaini Commented Jul 24, 2020 at 7:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.