I have two input field in view
<input name="test[]" type="text" value="one">
<input name="test[]" type="text" value="two">
in controller
public String store(@Context HttpServletRequest request) {
// now i get only last value
String[] array = request.getPerameter("test");
}
in PHP i can value as array using same way.
you can use request.getParameterValues(test)
Please check oracle doc for more info and here is an example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With