I have created an online form which allows a user to input the number of different products they want to return & then enter details about that product.
It's never known how many form input fields will be passed to a PHP script to process the form as it depends on the number of products the user wants to return & store the results into an MySQL database.
The way I was thinking of passing all form fields to the PHP script was by looping through the number of form fields via JavaScript & storing that figure in a hidden form input field then passing that to the PHP script & using that number to set-up a loop to iterate through the inputs.
I hope this makes sense & any advice would be appreciated.