I was wondering if what i've got going on here was going to work or not? for($i=0; $i<=$specsEntered; $i++) { $specNames[$i] = $_POST['specName' + $i]; } Code (markup): The reason for this for loop is to loop through the amount of information a user has entered in a form. I have it set up dynamically using javascript so that whenever the user wants to add another record it creates the instance in a table. The name for each input field is specName + number, say the user clicks the "add row" button 4 times, then there would be for input fields specName1, specName2, specName3, and specName4. What's needing to happen is for the php page that actually pulls the info and queries the database to be able to know how many variables to create to store information to depending on $specsEntered, which is the number of times user clicked the button(amount of input fields).... Does it look like what i have going on above would work? If not any ideas? thanks,
I suggest you use this for($i=0; $i<$specsEntered; $i++) { $specNames[$i] = $_POST['specName'][$i]; } Code (markup): And on the form, you can use: <input type="text" name="specName[0]" /> <input type="text" name="specName[1]" /> ..... Code (markup):