Hi all I have a form which is built to allow me to enter multiple sets of information using four form controls per set. Think of it like an invoice in which you put one item on each line, and each item has a name, description, price, etc. I built a form which allows me to add more sets of these four controls using javascript so I can enter multiple items. When I have completed adding my items, I then hit the submit button to add what I just key entered to my MySQL Database. So, if I have two rows of data entered, the code below will add two rows to my MySQL table called 'LINE_ITEMS' and grab the data from each of the four controls per item using $myvar = $_POST['controlx'] where "x" is an appended number referencing the correct control, based on which row the loop is on. Everything here works, the number of rows I've created get added to my table, but no data makes it into the MySQL table. Note below how I am trying to reference each control in the loops (e.g. itemSel1, txtQuantity1, txtTTValue1, txtSellValue1, then if there is another control set, itemSel2, txtQuantity2, txtTTValue2, txtSellValue2, on and on based on the number of rows (items).) $cArray = array('itemSel','txtQuantity','txtTTValue','txtSellValue'); //the base name of each control before they have their number appended $val_array = array(); //empty array for number of rows $strSQL_C = ''; $cVal = ''; $trans_id = $_GET['trans_id'];//Just a value i pass along from a previous page // // 1 array 4xN $numLines = $_POST['numLines']; //hidden field in my form keeping track of number of rows for the main loop. // 1st loop handles rows, 2nd loop handles columns to refer to each control name for ($i = 0; $i <= $numLines - 1; $i++ ) { for($j = 0; $j <= 3; $j++ ) { $iteration = $i + 1; $cVal = $cArray[$j] . (string)$iteration; //Concatenate the name & numerical iteration value to refer to the right control. this turns each control into it's base name PLUS the row number (e.g. itemSel becomes itemSel1, etc.) *****HERE IS WHERE IT SEEMS TO FAIL FOR SOME REASON********* $val_array[$i][$j] = $_POST['$cVal']; //Get the value for the control, for example, control itemSel1, or itemSel2 and pull the data in that control. It seems like $cVal is not being named correctly? I also tried omitting the single quotes between the $_POST[ ] brackets but no difference. *****END POSSIBLE FAILURE****** } // concatenate the values into one set for the SQL statement. $tempStr = "('$id','$trans_id','$val_array[$i][0]','$val_array[$i][1]','$val_array[$i][2]','$val_array[$i][3]'),"; //Append $tempStr to $strSQL_C. $strSQL_C = $strSQL_C . $tempStr; //**************************next, strip out the final comma from the $strSQL variable.********************************* } $strSQL = rtrim($strSQL_C, ","); // Build a SQL statement with VALUES(fld1, fld2, fld3, fld4), (fld1(2), fld2(2), fld3(2), fld4(2)), etc. // you end up with a 2-dimensional array that holds the values for each control for each row. 4 controls x N rows. //Change to line_items table $table = "LINE_ITEMS"; $sqlquery = "INSERT INTO $table VALUES" . $strSQL; $results = mysql_query($sqlquery) or die("Sql error: " . mysql_error()); Again, I can get the correct number of rows added to my MySQL table, just no data is actually making it into the database. Help & TIA! F