Accessing values from dynamically generated textboxes

Accessing values from dynamically generated textboxes

Hello, I am dynamically generating textboxes with jQuery which are filled with random numbers. I am not sure how I can access the values from the dynamically generated textboxes so that they can be inserted into a mysql db. The mysql db table would be created to handle the maximum number of possible fields, in this case it would be 60 (max option is 20 x 3 textboxes per set of numbers). Would anyone have any idea how I can access the values of the dynamically generated textboxes so they can be inserted into mysql? Would accessing the textbox values also allow the validation jQuery plugin to be used? Thank you very much. 


This is one way to access textbox values from a HTML form and insert them into mysql using PHP, is it possible to do something similar with the dynamically generated textboxes? Thank you very much. 

//require 'connect.inc.php';

$host="localhost"; // Host name 
$username="root"; // Mysql username 
$password=""; // Mysql password 
$db_name="data"; // Database name 
$tbl_name="numbers"; // Table name 

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

// Get values from form 
$num1=$_POST['num1'];
$num2=$_POST['num2'];
$num3=$_POST['num3'];
$num4=$_POST['num4'];
$num5=$_POST['num5'];

// Insert data into mysql 
$sql="INSERT INTO $tbl_name(num1, num2, num3, num4, num5)
VALUES('$num1', '$num2', '$num3', '$num4', '$num5')";
$result=mysql_query($sql);