Let’s imagine I got this:
index.php generates form with unpredictable number of inputs with certain IDs/Names and different values that can be edited by user and saved by script.php
<form action='script.php' method='post'> <input id='1' name='1' type='text' value='1'/> <input id='24' name='24' type='text' value='2233'/> <input id='55' name='55' type='text' value='231321'/> </form>
Script.php:
Here I need to get something like array of all inputs that were generated by index.php and save every value that corresponds to its id/name.
Is there a way to do this?
i may be missing something in your question, but the
$_POSTvariable will contain all the name => value pairs you’re asking for. for example, in your above HTML snippet: