I am trying to process a form that uses dynamically generated field names.
This is for my own use so it doesn't need to be pretty, just accurate
Not that it should matter but it is running: Linux, MySQL, PHP5, Apache2
items table
itemID int
itemName varchar
itemInUse tinyInt (boolean)
PRIMARY KEY(itemID)
inventory table
date_stamp
itemID
itemCount
PRIMARY KEY(date_stamp, itemID)
query to gather data for table
select itemID,itemName from items where itemInUse = True
what I am using to create the table
Code: Select all
print("<table border='1'>\n");
print("<tr><td>Item ID</td><td>Item Name</td><td>Count</td></tr>\n");
while($row = mysql_fetch_row($result)){
print("<tr><td>".$row[0]."</td><td>".$row[1]."</td><td><input type='text' name='item-".$row[0]."'</td></tr>\n");
}
...
I can't find any documentation for stepping through the POST data for unknown 'names'.
I wish I could describe this better.
Thanks,
Ed