动态表单,按星期几,将数据插入另一个数据库...无法将行放入数组以存储用于帖子页面提交的输入

I have a "working" inventory program that I'm trying to update. Currently, I have to go to several pages and add items to each one for entry into the database.

I made a dynamic tip entry form that grabs a list of active employees and puts them into a dropdown for a tip entry page so I no longer have to go in and add them to every page, just the one table in the database and they appear everywhere they need to be.

I'm trying to do something similar with my inventory program, but there are a lot of forms that are currently pulling from our daily inventory table.

I was trying to seamlessly switch to a new form that allows me to easily change which days of the week certain items need to be counted. That's the easy part. I've got it to where it picks items for which days of the week. There's another row though (called in_dailyinv_as) that has the name of that item in our old table that keeps the counts (The one that's connected to everything).

What I'm trying to do is make a dynamic for that picks the items needing counting for just that day, then put an input box by them for the guys to enter the count, and enter those numbers into the old database.

Where I've been stuck for hours is trying to get those three things (ITEM, in_dailyinv_as, and qty) to just show up as related in arrays once I hit post. I can figure out the getting it into the database once I figure out how to get those three things to show up on the next page (which at the moment is just print_r($_POST), and is all I need help with) when I hit submit.

It's not shown in the current version, but I can get ITEM and in_dailyinv_as easily, it's just associating them through arrays where I'm going insane.

$res=$conn->query("SELECT * FROM SHOPPING where (TYPE='YESNO' and ".$dow_text." = 'YES')");


$qty .= "<input type='number' name='qty[]'>";

while ($row = $res->fetch_assoc()) {
    unset($ITEM, $in_dailyinv_as);
    $item= $row['ITEM'];
    $in_dailyinv_as= $row['in_dailyinv_as'];

}


for($i = 0; $i <20; $i++){
echo $qty;
echo $item[i];
echo $in_dailyinv_as[i]; 
echo "<br>";  
}



echo "<input type='submit' value='submit'>";
echo "</form>";