Are you referring on the same code from this thread?
http://dynamicdrive.com/forums/showthread.php?t=37149
If so, change your script from:
Code:
inp1.setAttribute("name","Product" + rownum);
.
.
.
inp2.setAttribute("name","Manufacture" + rownum);
to:
Code:
inp1.setAttribute("name","Product[]");
.
.
.
inp2.setAttribute("name","Manufacture[]");
...and so, on your PHP, you could loop through all the Products and Manufacturer:
PHP Code:
echo $_POST['product'][0];
echo $_POST['product'][1];
...or a dynamic approach:
PHP Code:
<?php
$product=sizeof($_POST['product']); // Returns the length of product field
// $manufacturer=sizeof($_POST['manufacture']); // Returns the length of manufacture field
for($i=0;$i<$product;$i++)
echo $_POST['product'][$i]; // Shows contents of each product field
?>
Hope that helps.
Let me know if you're still stumped, probably via PM, chat or email, or at any setting you are convenient.
Bookmarks