Rectangle 27 0

php Accessing values in textboxes dynamically created by jQuery?

$('#TB' + n).val()

As they are in a form, the values will be posted to the speciefied form url in the tag action and will be available for processing with PHP

Hi @charlietfl, in your code is the array you are pulling data from using PHP called updateMasterNumbersArray()? Your code disabled the "Refresh all sets" button function for some reason. Also, your check function of duplicate values is occurring with all the textbox fields in every number set and checking for duplication. What I was seeking was to check each number set of 3 numbers individually and not checking against the other number sets. Each set of 3 numbers are checked for duplicates but not against the other number sets. Is that possible to do? Thanks much.

Hi, @charlietfl, were you able to make the changes so each set (or row) of textboxes can be checked for duplicate numbers if the user changes them and making the reset function again? Do you know how to add a button dynamically for each set of textboxes (row) to clear the textboxes and allow for new numbers to be generated in them? Also, can you provide your PHP code for how you submit the textbox fields for inserting into MySQL? My PHP code does not seem to be working. Thanks much.

OP is already doing what you suggest, however it lacks method to prevent duplicating ID's across forms. Selector you are using is invalid (missing prefix)

When you dynamically create the textboxes give them both an unique id tag and a name tag (same values)

You'll then be able to access them from JS with

ahhh.. wish I'd known about only check row for duplicates. That is so much easier and will cut out a bunch of my code. As for php , the javascript you see has nothing to do with php. The only php I've used is print_r($_GET) in a file that is the action for form. I'll revise the duplicate checks to just rows and fix the validation to match. Also will fix the reset

where n is the text box number you want to access.